mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-23 17:50:58 +01:00
try 1: Fix IndexOutOfBounds in SDL2GamepadDriver.cs
This commit is contained in:
parent
6de3afc43d
commit
52f42d450f
@ -115,7 +115,10 @@ namespace Ryujinx.Input.SDL2
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
_gamepadsIds.Insert(joystickDeviceId, id);
|
||||
if (joystickDeviceId <= _gamepadsIds.FindLastIndex(_ => true))
|
||||
_gamepadsIds.Insert(joystickDeviceId, id);
|
||||
else
|
||||
_gamepadsIds.Add(id);
|
||||
}
|
||||
|
||||
OnGamepadConnected?.Invoke(id);
|
||||
|
Loading…
Reference in New Issue
Block a user