Repository navigation
HLE: gamepads from SDL3 (SDL3.dll), with trigger rumble - #130
DaviTostes wants to merge 2 commits into
Conversation
XInput sees neither the pad on this machine (GameSir G7 Pro) nor trigger motors. The SDL3 backend loads SDL3.dll at run time, so the runtime still starts without it, and reads buttons, sticks, triggers and rumble from the pad; the title-memory and key paths are unchanged. VICTORY_INPUT forces sdl3 or xinput.
|
One line to change: the new Written with an AI assistant (Claude). |
|
Fixed in 8b96867: the comment now says "the title reads scan codes and virtual keys only" (the merged text had the name wrapped across two lines, so my earlier sweep missed that copy). |
|
Build check only: this PR merges cleanly on main c96b4f2 and the integration build of eight PRs (#115 #66 #36 #144 #147 #141 #139 #130) compiles (diagnostics profile). In the game, that combo was run alone 3 times (900 s, |
|
Build and symbol check on Windows 11 (no physical pad on this machine, so no pad reading was tested):
Not verified: any real pad (axes, trigger scaling, the inverted Y, rumble, hotplug) on Windows. Written with an AI assistant (Claude). |
What
Adds an SDL3 gamepad backend to the HLE
gameinputmodule.SDL3.dllis loaded at run time withLoadLibraryW, so a build or a machine without it keeps the XInput path exactly as it is;VICTORY_INPUT=sdl3|xinputforces one.Why
On the reporting machine (Linux, Wine 11.22 + vkd3d-proton 3.2, RX 9060 XT) XInput enumerates nothing for a GameSir G7 Pro — no device shows up at all — and where XInput does work it has no trigger motors, while the title sends four levels in slot
0x50. With SDL3 the pad is enumerated and all four motors are driven (SDL_RumbleGamepadfor the body,SDL_RumbleGamepadTriggersfor the triggers).How it behaves
PADSgamepads SDL lists, and rescans once a second for hotplug; an unchanged list opens nothing again.PadState; SDL's Y axis grows down and XInput's/ the console's grows up, so Y is negated.keys()keeps the fork's sharedkeys()(this port was written against upstreammainand the one conflict here was that refactor).SDL3.dllis optional. Without it nothing is logged unlessVICTORY_INPUT=sdl3, in which case the module warns and falls back to XInput.Tested
Linux, Wine 11.22, RADV (RX 9060 XT), this fork's
main+ #20 + upstream #454:Buttons, both sticks and the d-pad respond in the account picker and the menus; menus stay at 30-31 fps with the pad connected (the backend costs nothing measurable in the frame line).
SDL3.dllcame from Proton Experimental's wine-mono and from a Chromium bundle; both load.Limits