mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix boundary conditions for joystick adjustments
This commit is contained in:
parent
248dbba88d
commit
745aab78d1
1
CHANGES
1
CHANGES
|
@ -23,6 +23,7 @@ Bugfixes:
|
|||
- VFS: Fix resource leaks if some allocations fail
|
||||
- Debugger: Fix boundary conditions in tab completion
|
||||
- Video: Fix an issue with very long filenames
|
||||
- SDL: Fix boundary conditions for joystick adjustments
|
||||
Misc:
|
||||
- Qt: Show multiplayer numbers in window title
|
||||
- Qt: Solar sensor can have shortcuts set
|
||||
|
|
|
@ -190,7 +190,7 @@ void GBASDLPlayerLoadConfig(struct GBASDLPlayer* context, const struct Configura
|
|||
}
|
||||
|
||||
void GBASDLPlayerChangeJoystick(struct GBASDLEvents* events, struct GBASDLPlayer* player, size_t index) {
|
||||
if (player->playerId > MAX_PLAYERS || index >= events->nJoysticks) {
|
||||
if (player->playerId >= MAX_PLAYERS || index >= events->nJoysticks) {
|
||||
return;
|
||||
}
|
||||
events->joysticksClaimed[player->playerId] = index;
|
||||
|
|
Loading…
Reference in New Issue