@Schuay asked for a revert: see [here](https://github.com/Ryubing/Issues/issues/394#issuecomment-4359848762)
revert Disable SDL3 HIDAPI Switch driver when hid_nintendo is loaded
On Linux, the hid_nintendo kernel module creates separate evdev
devices for gamepad input and IMU (motion sensors), which SDL3's
evdev backend properly combines. When HIDAPI is active instead, it
conflicts with the kernel driver, breaking motion/gyro input and
controller hotplugging (especially via wireless dongles).
Automatically detect hid_nintendo via /sys/module and fall back to
the evdev backend. Can still be overridden with the env var
SDL_JOYSTICK_HIDAPI_SWITCH=1.
Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/46
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