コード例 #1
0
ファイル: sdl.go プロジェクト: kearsley/Go-SDL
// 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
}
コード例 #2
0
ファイル: sdl_joystick.go プロジェクト: TomMurray/go-sdl2
func (joystick *Joystick) Name() string {
	_joystick := (*C.SDL_Joystick)(joystick)
	return (C.GoString)(C.SDL_JoystickName(_joystick))
}
コード例 #3
0
ファイル: sdl.go プロジェクト: gnanderson/Go-SDL
func JoystickName(n int) string {
	return C.GoString(C.SDL_JoystickName(C.int(n)))
}
コード例 #4
0
ファイル: joystick.go プロジェクト: tanema/amore
// Joystick (https://wiki.libsdl.org/SDL_JoystickName)
func (joy *Joystick) Name() string {
	return (C.GoString)(C.SDL_JoystickName(joy.cptr()))
}
コード例 #5
0
ファイル: joystick.go プロジェクト: beoran/fungo
// 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)))
}