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) } }
// Count the number of joysticks attached to the system func NumJoysticks() int { GlobalMutex.Lock() num := int(C.SDL_NumJoysticks()) GlobalMutex.Unlock() return num }
func NumJoysticks() int { return (int)(C.SDL_NumJoysticks()) }
func NumJoysticks() int { return int(C.SDL_NumJoysticks()) }
// Count the number of joysticks attached to the system func NumJoysticks() int { num := int(C.SDL_NumJoysticks()) return num }