mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
fix SDL_FindFreePlayerIndex so it can really return -1.
This commit is contained in:
@@ -198,7 +198,7 @@ static SDL_bool SDL_GetDriverAndJoystickIndex(SDL_JoystickID instance_id, SDL_Jo
|
|||||||
|
|
||||||
static int SDL_FindFreePlayerIndex(void)
|
static int SDL_FindFreePlayerIndex(void)
|
||||||
{
|
{
|
||||||
int player_index = -1;
|
int player_index;
|
||||||
|
|
||||||
SDL_AssertJoysticksLocked();
|
SDL_AssertJoysticksLocked();
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ static int SDL_FindFreePlayerIndex(void)
|
|||||||
return player_index;
|
return player_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return player_index;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SDL_GetPlayerIndexForJoystickID(SDL_JoystickID instance_id)
|
static int SDL_GetPlayerIndexForJoystickID(SDL_JoystickID instance_id)
|
||||||
|
Reference in New Issue
Block a user