Example #1
0
// Get the current state of a POV hat on a joystick
// The hat indices start at index 0.
func (joystick *Joystick) GetHat(hat int) uint8 {
	return uint8(C.SDL_JoystickGetHat(joystick.cJoystick, C.int(hat)))
}
Example #2
0
func (joystick *Joystick) GetHat(hat int) byte {
	_joystick := (*C.SDL_Joystick)(joystick)
	_hat := (C.int)(hat)
	return (byte)(C.SDL_JoystickGetHat(_joystick, _hat))
}
Example #3
0
func (j *Joystick) GetHat(n int) int8 {
	return int8(C.SDL_JoystickGetHat((*C.SDL_Joystick)(unsafe.Pointer(j)), C.int(n)))
}
Example #4
0
// Joystick (https://wiki.libsdl.org/SDL_JoystickGetHat)
func (joy *Joystick) GetHat(hat int) byte {
	return (byte)(C.SDL_JoystickGetHat(joy.cptr(), C.int(hat)))
}
Example #5
0
//The hat indices start at index 0.
func JoystickGetHat(joystick *C.SDL_Joystick, hat int) uint8 {
	return uint8(C.SDL_JoystickGetHat(joystick, C.int(hat)))
}