Fix ID value for Joystick/Gamepad GUID lookup
This commit is contained in:
@@ -67,7 +67,8 @@ namespace lime {
|
||||
const char* Gamepad::GetDeviceGUID (int id) {
|
||||
|
||||
char* guid = new char[64];
|
||||
SDL_JoystickGetGUIDString (SDL_JoystickGetDeviceGUID (id), guid, 64);
|
||||
SDL_Joystick* joystick = SDL_GameControllerGetJoystick (gameControllers[id]);
|
||||
SDL_JoystickGetGUIDString (SDL_JoystickGetGUID (joystick), guid, 64);
|
||||
return guid;
|
||||
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace lime {
|
||||
const char* Joystick::GetDeviceGUID (int id) {
|
||||
|
||||
char* guid = new char[64];
|
||||
SDL_JoystickGetGUIDString (SDL_JoystickGetDeviceGUID (id), guid, 64);
|
||||
SDL_JoystickGetGUIDString (SDL_JoystickGetGUID (joysticks[id]), guid, 64);
|
||||
return guid;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user