本文整理汇总了Golang中C.SDL_NumJoysticks函数的典型用法代码示例。如果您正苦于以下问题:Golang SDL_NumJoysticks函数的具体用法?Golang SDL_NumJoysticks怎么用?Golang SDL_NumJoysticks使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SDL_NumJoysticks函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: makestickopened
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)
}
}
示例2: NumJoysticks
// Count the number of joysticks attached to the system
func NumJoysticks() int {
GlobalMutex.Lock()
num := int(C.SDL_NumJoysticks())
GlobalMutex.Unlock()
return num
}
示例3: NumJoysticks
func NumJoysticks() int {
return (int)(C.SDL_NumJoysticks())
}
示例4: NumJoysticks
func NumJoysticks() int {
return int(C.SDL_NumJoysticks())
}
示例5: NumJoysticks
// Count the number of joysticks attached to the system
func NumJoysticks() int {
num := int(C.SDL_NumJoysticks())
return num
}