Feature Request: SDL3 backend for GameInput shim (DualSense, trigger rumble, gyro & dynamic controller glyphs) #187
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#187
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Kabosune on GitHub · 2026-11-24 01:15 UTC · original
Summary
Since VIctory currently backs its HLE
gameinput.dllshim (crates/victory-hle/src/modules/gameinput.rs) with XInput, would you consider adding/switching to an SDL3 backend? Moving to SDL3 would unlock three closely related improvements:1. SDL3 Backend for the
GameInputShimSDL_RumbleGamepadTriggers()natively (which is currently listed under Input "Needs" in the README).SDL_SENSOR_GYRO/SDL_SENSOR_ACCEL(plus rumble/LEDs/touchpad) through a single unified API, whereas XInput / Windows GameInput don't expose gyro on most third-party controllers.2. Future Gyro Aiming
Simply swapping the
GameInputbackend to SDL3 won't automatically give the game gyro (since the Xbox binary itself doesn't readGameInputMotionStatefor aiming), so this would be a two-step progression:gameinput.dllshim with SDL3 for broad controller support and sensor access.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).3. Dynamic PlayStation / Nintendo / Steam Controller Glyphs
Because the Xbox Series X|S build only ships the
platform_xbsxcontroller glyphs (PlayStation glyphs are omitted), having SDL3 detect the active gamepad makes it possible to support custom PlayStation, Nintendo, and Steam Controller/Deck glyphs — including live on-the-spot switching — using open/CC0 icon sets.Technical Findings (Xbox Series X|S Dump)
Controller button art lives in two places:
In-game button prompts (HUD, menus, weapon wheel, map) — Pure Vector Scaleform GFx
data.rpf@0x117D7000(input_icons.gfx, 28,148 bytes decompressed, inside the nestedplatform_xbsxRPF9 at0x11757000).GFX*(SWF) containing 131DefineShape3vector shapes and 38DefineSpritesymbols (platform_xbsx.input_icons.Main_Button_4–39,58,59). There are no.ddstextures referenced byinput_icons.gfx.rockstar.input_icons:InputIconV2):generic_movie,hud, andmap_scripted_moviebuildplatformPackagePath("platform_" + <platform>), loadinput_icons.gfxonce vialoadAssets()(assetsLoaded = true), and instantiate glyphs via:Settings → Controls diagram (
IMG_Gamepad) — Single TTDB Texturedata/ttdb/ui/platform.ttpf1024×512BC7_UNORMtexture (64KB_Sswizzled,atHash64 = 0xA55E8BE9366FB118).Proposed Architecture for VIctory
SDL3 Active-Controller Detection
xbox,ps,nintendo,steam) usingSDL_GetGamepadType()(XBOX360/XBOXONE,PS4/PS5,NINTENDO_SWITCH_PRO, plus Valve VID0x28DEfor Steam Controller / Steam Deck) onSDL_EVENT_GAMEPAD_ADDED/REMOVEDand last-active input events.Moddable Glyph Packs (No Copyrighted Assets)
input_icons.gfxreplacements keeping the exactplatform_xbsx.input_icons.Main_Button_<id>class names, alongside matching1024×512 BC7platform.ttpfcontroller diagrams.Switching Strategies
input_icons.gfxanddata/ttdb/ui/platform.ttpfin the VFS layer and servemods/glyphs/<profile>/. BecauseInputIconV2cachesassetsLoaded = true, this applies on movie load/reload unless a reload is triggered on controller switch.input_icons.gfx): Pack all profiles as frames inside eachMain_Button_<id>MovieClip(Frame 1 = Xbox, 2 = PS, 3 = Nintendo, 4 = Steam). When SDL3 detects a controller switch, push the active frame index into Scaleform (gotoAndStop(profileFrame)) so every visible prompt updates on the next frame with zero reload, and swapplatform.ttpfvia VFS + texture cache invalidation.Thanks for all the work on VIctory!
@Marvisak on GitHub · 2026-11-25 01:47 UTC · original
Automated triage for the maintainers.
The description of
mainhere is accurate:crates/victory-hle/src/modules/gameinput.rstakes gamepads from XInput, drops trigger motors (theshortcutnote near the rumble code), and the README lists trigger rumble under what Input still needs. A different host input backend for DualSense, DualShock 4, trigger rumble and sensors fits the project's scope (Windows hosts, offline). Several open PRs already work on this: #312 (an SDL3 gamepad backend for the gameinput shim), #150 and #1517 (DualSense), #1786 (DualShock 4 over HID) and #1357 (trigger haptics through Windows.Gaming.Input). The glyph-replacement part means serving substitute title assets, which goes beyond what the project does today; whether to take that on is for the maintainers.One request: the "Technical Findings" section describes the contents of the title's files (archive offsets, internal names and code). Material taken from the game must not be posted in this repository.
Generated by Claude Code