mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-23 05:35:47 +00:00
fix: crash when connecting a joycon (ryubing/ryujinx!211)
See merge request ryubing/ryujinx!211
This commit is contained in:
@@ -154,8 +154,14 @@ namespace Ryujinx.Input.SDL3
|
||||
|
||||
if (SDL3JoyConPair.IsCombinable(_gamepadsIds))
|
||||
{
|
||||
// TODO - It appears that you can only have one joy con pair connected at a time?
|
||||
// This was also the behavior before SDL3
|
||||
_gamepadsIds.Remove(GetInstanceIdFromId(SDL3JoyConPair.Id));
|
||||
_gamepadsIds.Add(joystickInstanceId, SDL3JoyConPair.Id);
|
||||
uint fakeInstanceID = uint.MaxValue;
|
||||
while (!_gamepadsIds.TryAdd((SDL_JoystickID)fakeInstanceID, SDL3JoyConPair.Id))
|
||||
{
|
||||
fakeInstanceID--;
|
||||
}
|
||||
joyConPairConnected = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user