hle: opt in to GameInput XInput slots with a per-slot system fallback #61

Manually merged
github merged 2 commits from github-bot/gh-61 into main 2026-11-28 19:03:07 +00:00 AGit
Owner

@⁠superboynick on GitHub · 2026-11-27 15:29 UTC · original
superboynick:pr/gamepad-shim → main · +73 −2 · 1 files · 2 commits · merged 2026-11-28 19:01 UTC

What I tested

RTX 5070 Ti Laptop (12 GB), Windows 11 26100, release build. The controller here is not a wired pad: it is a GameInput synthetic device (SWD\SYNTHETICGAMEPADENUM with XboxService), and the system XInput answers 1167 on all four slots for it. The title's pad input goes through the gameinput HLE, which asked the system XInput - so the log showed only device=4 (the keyboard stand-in) and device=5 (the keyboard), no host pad at all.

What happened

With VICTORY_GAMEPAD_SHIM=1 the layer loads XInput at run time, tries C:\Program Files\Microsoft GameInput\x64\XInput1_3.dll first, then the system 1_4 / 1_3 / 9_1_0, takes the first backend with a pad in any slot, and remembers it for rumble.

  • The pad works for the first time here: host pad slot=0 through=...\Microsoft GameInput\x64\XInput1_3.dll, buttons=4 (A), left_x=1.0, right_x=1.0.
  • The keyboard still reports keys=[13]/[164] in the same frames, so both are live at once.
  • No crash across the run. The DualSense path upstream added is untouched, and a backend with no pad falls through per slot.
  • With the switch unset the old single-import path is used unchanged.

What would make it mergeable

  • Anyone with a GameInput-only pad confirming it, and anyone with an ordinary wired pad confirming nothing regressed.
  • A maintainer decision on whether the shim should be the default once a pad has been found this way, or stay opt-in.

Written with an AI assistant.

Added while chasing a report of "the pad does nothing": with VICTORY_GAMEPAD_LOG=1, each slot says once which
path answered it, and what the system XInput said when it did not.

VICTORY_GAMEPAD_LOG: no pad answered this slot slot=0 system=1167 gameinput="no pad in this slot either"
VICTORY_GAMEPAD_LOG: a pad answered this slot slot=0 through="Microsoft GameInput's XInput" buttons=0x4 left_x=1.0 ...

That is the difference between a pad the layer cannot see and a pad that is not there — on this machine all four
slots answer 1167 from the system and the same from GameInput's own DLL while the controller is asleep, which reads
identically to "unsupported" in the log as it was. Off by default; nothing changes with it unset.

**@⁠superboynick** on GitHub · 2026-11-27 15:29 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/61) `superboynick:pr/gamepad-shim` → `main` · +73 −2 · 1 files · 2 commits · merged 2026-11-28 19:01 UTC ## What I tested RTX 5070 Ti Laptop (12 GB), Windows 11 26100, release build. The controller here is not a wired pad: it is a GameInput synthetic device (`SWD\SYNTHETICGAMEPADENUM` with XboxService), and the system XInput answers 1167 on all four slots for it. The title's pad input goes through the gameinput HLE, which asked the system XInput - so the log showed only `device=4` (the keyboard stand-in) and `device=5` (the keyboard), no host pad at all. ## What happened With `VICTORY_GAMEPAD_SHIM=1` the layer loads XInput at run time, tries `C:\Program Files\Microsoft GameInput\x64\XInput1_3.dll` first, then the system 1_4 / 1_3 / 9_1_0, takes the first backend with a pad in any slot, and remembers it for rumble. - The pad works for the first time here: `host pad slot=0 through=...\Microsoft GameInput\x64\XInput1_3.dll`, `buttons=4` (A), `left_x=1.0`, `right_x=1.0`. - The keyboard still reports `keys=[13]/[164]` in the same frames, so both are live at once. - No crash across the run. The DualSense path upstream added is untouched, and a backend with no pad falls through per slot. - With the switch unset the old single-import path is used unchanged. ## What would make it mergeable - Anyone with a GameInput-only pad confirming it, and anyone with an ordinary wired pad confirming nothing regressed. - A maintainer decision on whether the shim should be the default once a pad has been found this way, or stay opt-in. Written with an AI assistant. --- Added while chasing a report of "the pad does nothing": with `VICTORY_GAMEPAD_LOG=1`, each slot says once which path answered it, and what the system XInput said when it did not. ``` VICTORY_GAMEPAD_LOG: no pad answered this slot slot=0 system=1167 gameinput="no pad in this slot either" VICTORY_GAMEPAD_LOG: a pad answered this slot slot=0 through="Microsoft GameInput's XInput" buttons=0x4 left_x=1.0 ... ``` That is the difference between a pad the layer cannot see and a pad that is not there — on this machine all four slots answer 1167 from the system and the same from GameInput's own DLL while the controller is asleep, which reads identically to "unsupported" in the log as it was. Off by default; nothing changes with it unset.
Disabled or unset preserves system XInput and the existing HID slot policy. The reference controller was exposed by GameInput while all four system XInput slots returned 1167. Send vibration to the provider that reported the slot.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 15:36:42 +00:00
github-bot force-pushed github-bot/gh-61 from 9a0962a212 to 992e81040c 2026-11-27 19:58:47 +00:00 Compare
github-bot force-pushed github-bot/gh-61 from 992e81040c to 4e10fb139b 2026-11-27 21:01:25 +00:00 Compare
github-bot force-pushed github-bot/gh-61 from 4e10fb139b to 4503128256 2026-11-27 22:49:31 +00:00 Compare
github-bot force-pushed github-bot/gh-61 from 4503128256 to 54b32e187f 2026-11-27 23:53:11 +00:00 Compare
A pad that does not work and a pad that is not there both end up as 'no host pad' in the log, which is the first thing worth telling apart when someone reports one. With VICTORY_GAMEPAD_LOG=1 each slot says once which path answered it and what the system XInput said when it did not, e.g.

  VICTORY_GAMEPAD_LOG: no pad answered this slot slot=0 system=1167 gameinput="no pad in this slot either"

or, for a pad that is there,

  VICTORY_GAMEPAD_LOG: a pad answered this slot slot=0 through="Microsoft GameInput's XInput" buttons=0x4 ...

Nothing changes with the switch unset.
github-bot force-pushed github-bot/gh-61 from cc65f90203 to 6e7fb2098e 2026-11-28 01:35:28 +00:00 Compare
github-bot force-pushed github-bot/gh-61 from 6e7fb2098e to 8ea59cd6dc 2026-11-28 03:54:55 +00:00 Compare
github-bot referenced this pull request from a commit 2026-11-28 19:02:00 +00:00
github manually merged commit 39c4b995cc into main 2026-11-28 19:03:07 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!61
No description provided.