Skip to content

Commit

Permalink
SDL_GetJoystickIDForPlayerIndex() should return 0 for invalid ID (tha…
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 4, 2023
1 parent 103fbcf commit c9aec26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/SDL_joystick.c
Expand Up @@ -232,7 +232,7 @@ static SDL_JoystickID SDL_GetJoystickIDForPlayerIndex(int player_index)
SDL_AssertJoysticksLocked();

if (player_index < 0 || player_index >= SDL_joystick_player_count) {
return -1;
return 0;
}
return SDL_joystick_players[player_index];
}
Expand Down

0 comments on commit c9aec26

Please sign in to comment.