Пример #1
0
// 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
// 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))
}