You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Use SDL3 as a backend for the GameInput shim (multi-controller, trigger rumble, and gyro support) #692
Hi! Since XCL currently backs its GameInput implementation with XInput (plus keyboard/mouse mapped as a gamepad in xcl.toml), would you consider adding an SDL3 backend for the GameInput layer?
Why SDL3
Native multi-controller support: DualSense, DualShock 4, Switch Pro, Xbox, Steam Controller, and Steam Deck work out of the box across every game XCL runs, without needing DS4Windows or Steam Input.
Trigger rumble & extra features: SDL3 exposes impulse/trigger rumble (SDL_RumbleGamepadTriggers), haptics, LEDs, and touchpad input through one unified API.
Unified motion sensor access: SDL3 exposes SDL_SENSOR_GYRO / SDL_SENSOR_ACCEL across supported controllers, whereas XInput has no sensor support and Windows GameInput doesn't expose gyro on most third-party controllers.
Optional Gyro Aiming (xcl.toml)
Simply swapping the GameInput backend to SDL3 won't automatically give console titles gyro aiming (since Xbox binaries generally don't read GameInputMotionState for camera control), so this splits cleanly into two parts:
Back the GameInput shim with SDL3 for broad controller support, trigger rumble, and sensor access.
Optionally feed SDL_SENSOR_GYRO deltas into the right-stick / aiming input (similar to XCL's existing mouse-to-right-stick path in xcl.toml), with simple config options for sensitivity and activation (e.g., active while holding LT/L2).
I looked at the open PRs that touch GameInput (#552, #565, #709, #710, #715, #731, #893) and at what SDL3 would add on top of them. DualShock 4 / DualSense input is already covered by #552, and #731 goes deeper on DualSense output (adaptive triggers, WASAPI haptics) than SDL3 can. XInput handles Xbox controllers.
What SDL3 uniquely provides is gyro/accel sensor data (SDL_GetGamepadSensorData) and support for controllers nothing else covers (Switch Pro, Steam Controller/Deck). I plan to add it as an optional sensor and extra-controller path, not a full backend replacement, loaded at runtime with no build-time dependency. The work is split into four PRs: (1) the gyro-to-stick mapping logic and config, (2) SDL3 dynamic loading and sensor reading, (3) SDL3 as a fallback for unsupported controllers, (4) diagnostics. Each is under ~400 lines, default-off, and stacked.
Thanks for digging through the open PRs. One concern about relying on the HID path (#552/#731) for PlayStation controllers: it's USB-only for DualSense, and most players use it over Bluetooth. Its DualSense input has also only been checked against a unit test, not a real controller. SDL3 already handles the DualSense/DS4 Bluetooth report formats (including the checksums on output reports), controller revisions, and hotplug, and it's maintained upstream. It also covers Switch Pro, Joy-Con, 8BitDo and others with the same code, so XCL doesn't need a separate parser for each vendor. Adaptive-trigger effects are possible through SDL_SendGamepadEffect too.
Would you consider making SDL3 (when the DLL is present) the main path for non-XInput controllers, and keeping the direct HID code for what SDL can't do, like #731's audio-driven haptics, or as a fallback when SDL3 isn't installed? That would give Bluetooth DualSense, gyro, and broad controller support in one place, without maintaining HID parsers for every controller.
Activity
vakaobr commentedon Nov 24, 2026
I looked at the open PRs that touch GameInput (#552, #565, #709, #710, #715, #731, #893) and at what SDL3 would add on top of them. DualShock 4 / DualSense input is already covered by #552, and #731 goes deeper on DualSense output (adaptive triggers, WASAPI haptics) than SDL3 can. XInput handles Xbox controllers.
What SDL3 uniquely provides is gyro/accel sensor data (
SDL_GetGamepadSensorData) and support for controllers nothing else covers (Switch Pro, Steam Controller/Deck). I plan to add it as an optional sensor and extra-controller path, not a full backend replacement, loaded at runtime with no build-time dependency. The work is split into four PRs: (1) the gyro-to-stick mapping logic and config, (2) SDL3 dynamic loading and sensor reading, (3) SDL3 as a fallback for unsupported controllers, (4) diagnostics. Each is under ~400 lines, default-off, and stacked.Kabosune commentedon Nov 24, 2026
Thanks for digging through the open PRs. One concern about relying on the HID path (#552/#731) for PlayStation controllers: it's USB-only for DualSense, and most players use it over Bluetooth. Its DualSense input has also only been checked against a unit test, not a real controller. SDL3 already handles the DualSense/DS4 Bluetooth report formats (including the checksums on output reports), controller revisions, and hotplug, and it's maintained upstream. It also covers Switch Pro, Joy-Con, 8BitDo and others with the same code, so XCL doesn't need a separate parser for each vendor. Adaptive-trigger effects are possible through
SDL_SendGamepadEffecttoo.Would you consider making SDL3 (when the DLL is present) the main path for non-XInput controllers, and keeping the direct HID code for what SDL can't do, like #731's audio-driven haptics, or as a fallback when SDL3 isn't installed? That would give Bluetooth DualSense, gyro, and broad controller support in one place, without maintaining HID parsers for every controller.