mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
SDL_FindFreePlayerIndex() will always return the next available player index
Fixes https://github.com/libsdl-org/SDL/issues/7868
This commit is contained in:
parent
267fdd7daa
commit
87e916dd21
1 changed files with 2 additions and 2 deletions
|
|
@ -218,10 +218,10 @@ static int SDL_FindFreePlayerIndex(void)
|
|||
|
||||
for (player_index = 0; player_index < SDL_joystick_player_count; ++player_index) {
|
||||
if (SDL_joystick_players[player_index] == 0) {
|
||||
return player_index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return player_index;
|
||||
}
|
||||
|
||||
static int SDL_GetPlayerIndexForJoystickID(SDL_JoystickID instance_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue