HLE: gamepads from SDL3 (SDL3.dll), with trigger rumble #130
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!130
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-130"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@DaviTostes on GitHub · 2026-11-24 21:43 UTC · original
DaviTostes:sdl3-gamepad-clean→main· +351 −45 · 1 files · 2 commits · openWhat
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
@ericomeehan on GitHub · 2026-11-24 22:33 UTC · original
One line to change: the new
// shortcut: no characters (code point 0); …comment ingameinput.rs(around the keyboard reading's..Default::default()) names the title in full.4e17478removed the name from the tree, so "the title reads scan codes and virtual keys only" keeps it consistent.Written with an AI assistant (Claude).
@DaviTostes on GitHub · 2026-11-25 01:01 UTC · original
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).grep -rn "Grand Theft" crates/is clean.@Revens2 on GitHub · 2026-11-25 05:13 UTC · original
Build check only: this PR merges cleanly on main
c96b4f2and 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,VICTORY_RELAY=2, scripted input): one run to the end (median 4.95 fps, about 4.9k draws per frame, against 4.84-5.04 fps on main), one title breakpoint0x80000003at about 157 s after a failed dstorage request (the pattern is explained on #115), one device removed (0x887A0005) at about 160 s that did not repeat in the two other runs. Nothing is proven for this PR alone: it was not run on its own,cargo testwas not run on the combo, and nothing was checked on the title side of its change. Not verified.@Revens2 on GitHub · 2026-11-25 07:40 UTC · original
Build and symbol check on Windows 11 (no physical pad on this machine, so no pad reading was tested):
8b96867merged with maina26859f(no conflict):cargo build --profile diag -p victory --features diagnostics --lockedbuilds;cargo test -p victory-hle gameinputgives 7 passed, 0 failed.GetProcAddress(SDL_Init,SDL_GetGamepads,SDL_OpenGamepad,SDL_CloseGamepad,SDL_UpdateGamepads,SDL_GetGamepadButton,SDL_GetGamepadAxis,SDL_RumbleGamepad,SDL_RumbleGamepadTriggers,SDL_free,SDL_Quit) are present in the export table of the officialSDL3.dll3.4.20 (win32-x64, libsdl-org release): checked by reading the PE exports.VICTORY_INPUT=sdl3is queued (about 25 min, keyboard stand-in script, no pad): result to follow, with the log lines of the backend choice.Not verified: any real pad (axes, trigger scaling, the inverted Y, rumble, hotplug) on Windows.
Written with an AI assistant (Claude).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.