Compare commits

...

1 Commits

Author SHA1 Message Date
Max
fa72b5a298 Revert "fix/sdl3-gamepad-bugs (#19)" (#116)
This reverts commit 7f0e82fe48.

Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/116
2026-05-27 14:10:33 +00:00
3 changed files with 25 additions and 16 deletions

View File

@@ -155,9 +155,7 @@ namespace Ryujinx.Input.SDL3
result |= GamepadFeaturesFlag.Led;
}
SDL_UnlockProperties(propID);
// NOTE: Do not call SDL_DestroyProperties here. These properties are owned
// internally by SDL and are freed when SDL_CloseGamepad is called (in Dispose).
SDL_DestroyProperties(propID);
return result;
}

View File

@@ -331,18 +331,28 @@ namespace Ryujinx.Input.SDL3
public IEnumerable<IGamepad> GetGamepads()
{
string[] ids;
lock (_lock)
lock (_gamepadsIds)
{
ids = _gamepadsIds.Values
.Concat(_joyConsIds.Values)
.Concat(_linkedJoyConsIds.Values)
.ToArray();
foreach (var gamepad in _gamepadsIds)
{
yield return GetGamepad(gamepad.Value);
}
}
foreach (string id in ids)
lock (_joyConsIds)
{
yield return GetGamepad(id);
foreach (var gamepad in _joyConsIds)
{
yield return GetGamepad(gamepad.Value);
}
}
lock (_linkedJoyConsIds)
{
foreach (var gamepad in _linkedJoyConsIds)
{
yield return GetGamepad(gamepad.Value);
}
}
}
}

View File

@@ -561,6 +561,7 @@ namespace Ryujinx.Input.HLE
!controllerConfig.Rumble.EnableRumble)
{
return;
}
VibrationValue leftVibrationValue = dualVibrationValue.Item1;