Golang C.SDL_JoystickName类(方法)实例源码

下面列出了Golang C.SDL_JoystickName 类(方法)源码代码实例,从而了解它的用法。

作者:kearsle    项目:Go-SD   
// 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
}

作者:TomMurra    项目:go-sdl   
func (joystick *Joystick) Name() string {
	_joystick := (*C.SDL_Joystick)(joystick)
	return (C.GoString)(C.SDL_JoystickName(_joystick))
}

作者:gnanderso    项目:Go-SD   
func JoystickName(n int) string {
	return C.GoString(C.SDL_JoystickName(C.int(n)))
}

作者:tanem    项目:amor   
// Joystick (https://wiki.libsdl.org/SDL_JoystickName)
func (joy *Joystick) Name() string {
	return (C.GoString)(C.SDL_JoystickName(joy.cptr()))
}

作者:beora    项目:fung   
// 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)))
}


问题


面经


文章

微信
公众号

扫码关注公众号