예제 #1
0
파일: joystick.go 프로젝트: tanema/amore
// JoystickGetGUIDString (https://wiki.libsdl.org/SDL_JoystickGetGUIDString)
func JoystickGetGUIDString(guid JoystickGUID) string {
	_pszGUID := make([]rune, 1024)
	pszGUID := C.CString(string(_pszGUID[:]))
	defer C.free(unsafe.Pointer(pszGUID))
	C.SDL_JoystickGetGUIDString(guid.c(), pszGUID, C.int(unsafe.Sizeof(_pszGUID)))
	return C.GoString(pszGUID)
}
예제 #2
0
func JoystickGetGUIDString(guid JoystickGUID, pszGUID string, cbGUID int) {
	_guid := (C.SDL_JoystickGUID)(guid)
	_pszGUID := C.CString(pszGUID)
	defer C.free(unsafe.Pointer(_pszGUID))
	_cbGUID := (C.int)(cbGUID)
	C.SDL_JoystickGetGUIDString(_guid, _pszGUID, _cbGUID)
}
예제 #3
0
파일: joystick.go 프로젝트: flazz/go-sdl2
// JoystickGetGUIDString (https://wiki.libsdl.org/SDL_JoystickGetGUIDString)
func JoystickGetGUIDString(guid JoystickGUID, pszGUID string, cbGUID int) {
	_pszGUID := C.CString(pszGUID)
	defer C.free(unsafe.Pointer(_pszGUID))
	C.SDL_JoystickGetGUIDString(guid.c(), _pszGUID, C.int(cbGUID))
}