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

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

作者:21isgonnabeagoodyea    项目:gg   
func makestickopened() {
	if joy == nil {
		C.SDL_InitSubSystem(C.SDL_INIT_JOYSTICK)
		fmt.Println(int(C.SDL_NumJoysticks()))
		joy = C.SDL_JoystickOpen(0)
		fmt.Println(joy)
	}
}

作者:kearsle    项目:Go-SD   
// Count the number of joysticks attached to the system
func NumJoysticks() int {
	GlobalMutex.Lock()
	num := int(C.SDL_NumJoysticks())
	GlobalMutex.Unlock()
	return num
}

作者:TomMurra    项目:go-sdl   
func NumJoysticks() int {
	return (int)(C.SDL_NumJoysticks())
}

作者:gnanderso    项目:Go-SD   
func NumJoysticks() int {
	return int(C.SDL_NumJoysticks())
}

作者:kri    项目:Go-SDL   
// Count the number of joysticks attached to the system
func NumJoysticks() int {
	num := int(C.SDL_NumJoysticks())
	return num
}


问题


面经


文章

微信
公众号

扫码关注公众号