ryujinx_ryubing/src
Schuay 7f0e82fe48
Some checks are pending
Canary CI / Release for linux-arm64 (push) Waiting to run
Canary CI / Release for linux-x64 (push) Waiting to run
Canary CI / Release for win-x64 (push) Waiting to run
Canary CI / Release MacOS universal (push) Waiting to run
Canary CI / Post CI Steps (push) Blocked by required conditions
fix/sdl3-gamepad-bugs (#19)
Four SDL3 gamepad fixes, all affecting real users with Switch controllers.

**Crash on reconnect / broken motion** — `GetFeaturesFlag()` was calling `SDL_DestroyProperties()` on properties owned by SDL internally, causing a use-after-free. This breaks gyro after the first read and crashes on reconnect. Fix: just don't destroy them.

**Thread safety in `GetGamepads()`** — was locking the wrong objects and holding locks across `yield` boundaries, which is undefined behavior with `System.Threading.Lock`. Fix: snapshot IDs under `_lock`, iterate outside it.

**Rumble NPE on disconnect** — `UpdateRumble()` called `_gamepad.Rumble()` without a null check; throws if the controller disconnects mid-update. Fix: `_gamepad?.Rumble(...)`.

**Linux: HIDAPI conflicts with `hid_nintendo`** — when the `hid_nintendo` kernel module is loaded, it provides evdev nodes for both the gamepad and IMU that SDL3's evdev backend correctly combines. HIDAPI conflicts with it, breaking gyro and wireless hotplug. Fix: detect `/sys/module/hid_nintendo` at startup and disable HIDAPI for Switch controllers automatically. Overridable via `SDL_JOYSTICK_HIDAPI_SWITCH=1`.

Tested with an 8BitDo Ultimate Bluetooth Controller on Linux.

Co-authored-by: schuay <36006+schuay@users.noreply.github.com>
Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/19
2026-04-18 13:54:25 +00:00
..
ARMeilleure [ci skip] replace all usages of IntPtr with nint 2026-01-27 17:41:46 -06:00
Ryujinx chore: post-migration cleanup 2026-04-13 00:51:10 -05:00
Ryujinx.Audio audio: Fix crash due to invalid Splitter size (ryubing/ryujinx!257) 2026-01-31 11:22:14 -06:00
Ryujinx.Audio.Backends.Apple fix AppleHardwareDeviceDriver.IsSupported (no fancy check is needed; it's on any macOS version 10.5 (Leopard) and above) 2026-01-28 00:05:02 -06:00
Ryujinx.Audio.Backends.OpenAL audio backend projects code cleanup 2026-01-27 17:34:51 -06:00
Ryujinx.Audio.Backends.SDL3 audio backend projects code cleanup 2026-01-27 17:34:51 -06:00
Ryujinx.Audio.Backends.SoundIo [ci skip] replace all usages of IntPtr with nint 2026-01-27 17:41:46 -06:00
Ryujinx.BuildValidationTasks Fixed spelling in LocalesValidationTask.cs (ryubing/ryujinx!269) 2026-02-21 04:37:02 -06:00
Ryujinx.Common chore: post-migration cleanup 2026-04-13 00:51:10 -05:00
Ryujinx.Cpu [ci skip] replace all usages of IntPtr with nint 2026-01-27 17:41:46 -06:00
Ryujinx.Graphics.Device Memory changes 2.2 (ryubing/ryujinx!143) 2025-09-06 11:10:55 -05:00
Ryujinx.Graphics.GAL Memory Changes 3.2 (ryubing/ryujinx!234) 2025-12-06 17:19:19 -06:00
Ryujinx.Graphics.Gpu [ci skip] replace all usages of IntPtr with nint 2026-01-27 17:41:46 -06:00
Ryujinx.Graphics.Host1x Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)" 2025-06-15 20:45:26 -05:00
Ryujinx.Graphics.Nvdec Memory Changes part 2 (ryubing/ryujinx!123) 2025-08-25 17:44:15 -05:00
Ryujinx.Graphics.Nvdec.FFmpeg Memory Changes part 2 (ryubing/ryujinx!123) 2025-08-25 17:44:15 -05:00
Ryujinx.Graphics.Nvdec.Vp9 Memory Changes part 2 (ryubing/ryujinx!123) 2025-08-25 17:44:15 -05:00
Ryujinx.Graphics.OpenGL Memory Changes 3.2 (ryubing/ryujinx!234) 2025-12-06 17:19:19 -06:00
Ryujinx.Graphics.RenderDocApi RenderDoc API support (ryubing/ryujinx!242) 2026-01-01 00:10:21 -06:00
Ryujinx.Graphics.Shader Use the new C# 14 null propagation setter 2025-11-16 19:14:26 -06:00
Ryujinx.Graphics.Texture Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)" 2025-06-15 20:45:26 -05:00
Ryujinx.Graphics.Vic chore: Overall code cleanup 2025-10-26 01:22:20 -05:00
Ryujinx.Graphics.Video Fix ~3500 analyser issues 2025-05-30 17:08:34 -05:00
Ryujinx.Graphics.Vulkan [ci skip] replace all usages of IntPtr with nint 2026-01-27 17:41:46 -06:00
Ryujinx.HLE HLE: CaptureManager: SaveScreenShot: properly handle screenshot image data (#18) 2026-04-17 23:08:33 +00:00
Ryujinx.HLE.Generators Fix ~3500 analyser issues 2025-05-30 17:08:34 -05:00
Ryujinx.Horizon Accurate Service Names (ryubing/ryujinx!296) 2026-04-01 11:08:10 -05:00
Ryujinx.Horizon.Common Fix ~3500 analyser issues 2025-05-30 17:08:34 -05:00
Ryujinx.Horizon.Generators Fix ~3500 analyser issues 2025-05-30 17:08:34 -05:00
Ryujinx.Horizon.Kernel.Generators Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)" 2025-06-15 20:45:26 -05:00
Ryujinx.Input fix/sdl3-gamepad-bugs (#19) 2026-04-18 13:54:25 +00:00
Ryujinx.Input.SDL3 fix/sdl3-gamepad-bugs (#19) 2026-04-18 13:54:25 +00:00
Ryujinx.Memory [ci skip] replace all usages of IntPtr with nint 2026-01-27 17:41:46 -06:00
Ryujinx.SDL3.Common fix/sdl3-gamepad-bugs (#19) 2026-04-18 13:54:25 +00:00
Ryujinx.ShaderTools Revert the Metal Experiment (#701) 2025-02-22 21:26:46 -06:00
Ryujinx.Tests Update BiquadFilterEffectParameterTests.cs 2026-04-11 22:34:03 -04:00
Ryujinx.Tests.Memory feature: .NET 10 (ryubing/ryujinx!214) 2025-11-11 12:55:36 -06:00
Ryujinx.Tests.Unicorn Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)" 2025-06-15 20:45:26 -05:00
Ryujinx.UI.LocaleGenerator Fractured Locales Support (ryubing/ryujinx!238) 2025-12-27 14:07:56 -06:00
Spv.Generator Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)" 2025-06-15 20:45:26 -05:00