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