Golang C.SDL_JoystickGetHat类(方法)实例源码

下面列出了Golang C.SDL_JoystickGetHat 类(方法)源码代码实例,从而了解它的用法。

作者:kearsle    项目:Go-SD   
// 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)))
}

作者:TomMurra    项目:go-sdl   
func (joystick *Joystick) GetHat(hat int) byte {
	_joystick := (*C.SDL_Joystick)(joystick)
	_hat := (C.int)(hat)
	return (byte)(C.SDL_JoystickGetHat(_joystick, _hat))
}

作者:gnanderso    项目:Go-SD   
func (j *Joystick) GetHat(n int) int8 {
	return int8(C.SDL_JoystickGetHat((*C.SDL_Joystick)(unsafe.Pointer(j)), C.int(n)))
}

作者:tanem    项目:amor   
// Joystick (https://wiki.libsdl.org/SDL_JoystickGetHat)
func (joy *Joystick) GetHat(hat int) byte {
	return (byte)(C.SDL_JoystickGetHat(joy.cptr(), C.int(hat)))
}

作者:beora    项目:fung   
//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)))
}


问题


面经


文章

微信
公众号

扫码关注公众号