#660
Feature Request: Use SDL3 as the backend for the GameInput shim (DualSense & gyro support)
Hi! Since Leonida has to shim/reimplement Xbox's GameInput API for PC, would you consider backing the GameInput layer with SDL3?
Why SDL3:
- Native multi-controller support: DualSense, DualShock 4, Switch Pro, Xbox, Steam Deck, etc. work out of the box without needing DS4Windows or Steam Input.
- Sensor & DualSense features: SDL3 exposes
SDL_SENSOR_GYRO/SDL_SENSOR_ACCEL(plus rumble/LEDs/touchpad) through a single unified API, whereas Windows GameInput doesn't expose gyro on most third-party controllers.
Regarding gyro aiming:
I know simply swapping the GameInput backend to SDL3 won't automatically give the game gyro (since the Xbox binary itself doesn't read GameInputMotionState for aiming), so this would be a two-part thing:
- Back the
GameInputshim with SDL3 for broad controller support and sensor access. - Down the line (once camera/mouse look hooks are in place), optionally feed
SDL_SENSOR_GYROdeltas directly into the camera/aiming input (or mouse look) for true mouse-like gyro aiming—with a simple toggle/sensitivity config (e.g., gyro active on ADS/L2).
Thanks for all the work on the project!
Looked into picking this up. Two things need deciding before code:
GameInputshim yet. Nothing inruntime/,docs/ortools/mentionsGameInput, and nothing measured so far shows which interface version (if any) the executable asks for. PerAGENTS.md("before you guess, look"), the first step is checking the game's imports (GameInput.dll/GameInputCreate, and the IID it requests) on someone's own copy, so the shim matches the real ABI.third_party/xtaskqueuetoday. SDL3 is zlib-licensed, but it's much larger; is it acceptable inthird_party/(or as an optional CMake dependency)?Proposed order if SDL3 is OK:
GameInputshim for one standard gamepad (buttons, sticks, triggers, rumble), on the interface version the imports show;Happy to take the first two once there's a yes on SDL3 and someone with the game can confirm the import. AI-assisted.