作者: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
}