mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-22 22:00:55 -06:00
try 1: Fix IndexOutOfBounds in SDL2GamepadDriver.cs
This commit is contained in:
@ -115,7 +115,10 @@ namespace Ryujinx.Input.SDL2
|
|||||||
{
|
{
|
||||||
lock (_lock)
|
lock (_lock)
|
||||||
{
|
{
|
||||||
_gamepadsIds.Insert(joystickDeviceId, id);
|
if (joystickDeviceId <= _gamepadsIds.FindLastIndex(_ => true))
|
||||||
|
_gamepadsIds.Insert(joystickDeviceId, id);
|
||||||
|
else
|
||||||
|
_gamepadsIds.Add(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
OnGamepadConnected?.Invoke(id);
|
OnGamepadConnected?.Invoke(id);
|
||||||
|
Reference in New Issue
Block a user