mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 01:49:39 -06:00
try 1: Fix IndexOutOfBounds in SDL2GamepadDriver.cs
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user