예제 #1
0
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
0
파일: sdl.go 프로젝트: kearsley/Go-SDL
// Count the number of joysticks attached to the system
func NumJoysticks() int {
	GlobalMutex.Lock()
	num := int(C.SDL_NumJoysticks())
	GlobalMutex.Unlock()
	return num
}
예제 #3
0
func NumJoysticks() int {
	return (int)(C.SDL_NumJoysticks())
}
예제 #4
0
파일: sdl.go 프로젝트: gnanderson/Go-SDL
func NumJoysticks() int {
	return int(C.SDL_NumJoysticks())
}
예제 #5
0
파일: input.go 프로젝트: krig/Go-SDL2
// Count the number of joysticks attached to the system
func NumJoysticks() int {
	num := int(C.SDL_NumJoysticks())
	return num
}