Fix joystick instance id check

This commit is contained in:
Mathieu Eyraud authored and Sam Lantinga committed 2023-01-02 09:04:18 -08:00
1 parent ea6f0ae683
commit fa5475ba9f
1 file changed
+1 -1
+1 -1
View File
@@ -277,7 +277,7 @@ static SDL_bool SDL_SetJoystickIDForPlayerIndex(int player_index, SDL_JoystickID
}
/* Move any existing joystick to another slot */
if (existing_instance >= 0) {
if (existing_instance > 0) {
SDL_SetJoystickIDForPlayerIndex(SDL_FindFreePlayerIndex(), existing_instance);
}
return SDL_TRUE;