作者: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
// Open a joystick for use The index passed as an argument refers to
// the N'th joystick on the system. This index is the value which will
// identify this joystick in future joystick events. This function
// returns a joystick identifier, or NULL if an error occurred.
func JoystickOpen(deviceIndex int) *Joystick {
GlobalMutex.Lock()
joystick := C.SDL_JoystickOpen(C.int(deviceIndex))
GlobalMutex.Unlock()
return wrapJoystick(joystick)
}
作者:TomMurra
项目:go-sdl
func JoystickOpen(device_index int) *Joystick {
_device_index := (C.int)(device_index)
return (*Joystick)(C.SDL_JoystickOpen(_device_index))
}
作者:tanem
项目:amor
// JoystickOpen (https://wiki.libsdl.org/SDL_JoystickOpen)
func JoystickOpen(index JoystickID) *Joystick {
return (*Joystick)(C.SDL_JoystickOpen(C.int(index)))
}
作者:gnanderso
项目:Go-SD
func JoystickOpen(n int) *Joystick {
return (*Joystick)(unsafe.Pointer(C.SDL_JoystickOpen(C.int(n))))
}
作者:kri
项目:Go-SDL
// Open a joystick for use The index passed as an argument refers to
// the N'th joystick on the system. This index is the value which will
// identify this joystick in future joystick events. This function
// returns a joystick identifier, or NULL if an error occurred.
func JoystickOpen(deviceIndex int) *Joystick {
joystick := C.SDL_JoystickOpen(C.int(deviceIndex))
return wrapJoystick(joystick)
}
作者:beora
项目:fung
// Open a joystick for use - the index passed as an argument refers to
// the N'th joystick on the system. This index is the value which will
// identify this joystick in future joystick events.
// This function returns a joystick identifier, or NULL if an error occurred.
func JoystickOpen(index int) *C.SDL_Joystick {
return C.SDL_JoystickOpen(C.int(index))
}