Просмотр исходного кода

Fix joystick instance id check

Mathieu Eyraud 3 лет назад
Родитель
Сommit
fa5475ba9f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/joystick/SDL_joystick.c

+ 1 - 1
src/joystick/SDL_joystick.c

@@ -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;