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

Merged
superboynick merged 2 commits from upstream-pr/61 into main 2026-11-28 19:01:28 +00:00
superboynick commented 2026-11-27 15:29:03 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by superboynick on 2026-11-27T15:29:03Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5529147402 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/61). Originally posted by [superboynick](https://github.com/superboynick) on 2026-11-27T15:29:03Z. --- ## 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.
Sign in to join this conversation.
No reviewers
No labels
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.

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