示例#1
0
文件: sdl.go 项目: kearsley/Go-SDL
// 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)))
}
示例#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))
}
示例#3
0
文件: sdl.go 项目: gnanderson/Go-SDL
func (j *Joystick) GetHat(n int) int8 {
	return int8(C.SDL_JoystickGetHat((*C.SDL_Joystick)(unsafe.Pointer(j)), C.int(n)))
}
示例#4
0
文件: joystick.go 项目: tanema/amore
// Joystick (https://wiki.libsdl.org/SDL_JoystickGetHat)
func (joy *Joystick) GetHat(hat int) byte {
	return (byte)(C.SDL_JoystickGetHat(joy.cptr(), C.int(hat)))
}
示例#5
0
文件: joystick.go 项目: beoran/fungo
//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)))
}