Exemplo n.º 1
0
// Get the implementation dependent name of a joystick.
// This can be called before any joysticks are opened.
// If no name can be found, this function returns NULL.
func JoystickName(deviceIndex int) string {
	GlobalMutex.Lock()
	name := C.GoString(C.SDL_JoystickName(C.int(deviceIndex)))
	GlobalMutex.Unlock()
	return name
}
Exemplo n.º 2
0
func (joystick *Joystick) Name() string {
	_joystick := (*C.SDL_Joystick)(joystick)
	return (C.GoString)(C.SDL_JoystickName(_joystick))
}
Exemplo n.º 3
0
func JoystickName(n int) string {
	return C.GoString(C.SDL_JoystickName(C.int(n)))
}
Exemplo n.º 4
0
// Joystick (https://wiki.libsdl.org/SDL_JoystickName)
func (joy *Joystick) Name() string {
	return (C.GoString)(C.SDL_JoystickName(joy.cptr()))
}
Exemplo n.º 5
0
// Get the implementation dependent name of a joystick.
// This can be called before any joysticks are opened.
// If no name can be found, this function returns NULL.
func JoystickName(index int) string {
	return C.GoString(C.SDL_JoystickName(C.int(index)))
}