mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 08:56:25 +00:00
Fix joystick instance id check
This commit is contained in:

committed by
Sam Lantinga

parent
ea6f0ae683
commit
fa5475ba9f
@@ -277,7 +277,7 @@ static SDL_bool SDL_SetJoystickIDForPlayerIndex(int player_index, SDL_JoystickID
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Move any existing joystick to another slot */
|
/* Move any existing joystick to another slot */
|
||||||
if (existing_instance >= 0) {
|
if (existing_instance > 0) {
|
||||||
SDL_SetJoystickIDForPlayerIndex(SDL_FindFreePlayerIndex(), existing_instance);
|
SDL_SetJoystickIDForPlayerIndex(SDL_FindFreePlayerIndex(), existing_instance);
|
||||||
}
|
}
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
|
Reference in New Issue
Block a user