mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-11-19 09:21:15 +01:00
try 1: Fix IndexOutOfBounds in SDL2GamepadDriver.cs
This commit is contained in:
1 parent
7979f7664e
commit
13db6067d2
1 file changed
+4
-1
@@ -117,7 +117,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);
|
||||
|
||||
Reference in new issue
Block a user