Input: the keyboard also drives the first connected pad #240
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/Belobug--VIctory-Belobug-AMD!240
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-240"
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?
@MamaLeVrai on GitHub · 2026-11-26 08:39 UTC · original
MamaLeVrai:keys-with-pad→main· +77 −5 · 2 files · 1 commits · openWhat
The keyboard's stand-in pad (WASD, Enter, arrows, ...; README "Input") worked only while no pad was connected. Any XInput pad in a slot took it away, even an idle one. Now, while a pad is connected, the keyboard also drives the first connected pad:
With no key held, the pad reads exactly as before. With no pad connected, nothing changes: the stand-in pad is still its own device. Other pads are not touched, and the keyboard device itself is unchanged.
Files:
gameinput.rs(State::poll, newwith_keys, module doc), README (Input).Why
A wired pad left plugged into the host made the keyboard do nothing in the game. That happened here when playing over remote desktop (Parsec) with no pad at hand: Windows still saw a wired pad in XInput slot 0 (USB VID 146B, PID 0609), and the log showed
input device device=0 connected=truewith no stand-in (device 4). A virtual XInput pad, such as one made by ViGEm-based tools, would have the same effect (not tried).Tests
New test
keys_also_drive_the_first_connected_pad, with pads in slots 1 and 2:With the merge taken out of
State::poll, this test fails (left: PadState { buttons: 8, left_trigger: 0.75, ... },right: PadState { buttons: 12, left_trigger: 1.0, ... }).cargo test --release -p victory-hle --libon this branch: 98 passed, 5 failed, 1 ignored. The 5 failures are thexmemtests that already fail on main on this host (issue #2, fixed by #93). All 9gameinputtests pass.cargo clippy --release -p victory-hle --all-targets --no-depsreports one warning, inxmem.rs(as on main), and none ingameinput.rs. The branch merges cleanly with #66, which also touchesgameinput.rs.Host: RX 6950 XT, Windows 11.
Not tested
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code
@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-26 08:39 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@MamaLeVrai on GitHub · 2026-11-26 08:57 UTC · original
Note: the default branch is now
rx9070xt, and there this is already handled differently.VICTORY_ONE_PAD(on by default) shows the title one pad that is always there, fed by the keyboard and every host pad (merged,State::poll). So this PR only matters formain. Ifmainis no longer maintained, it can be closed.AI-assisted (Claude Code); no game data.
@gut0to on GitHub · 2026-11-26 16:17 UTC · original · reviewed
AI-assisted review. I inspected the new input merge and its unit test statically; I did not run tests or the game. This review suggests one focused state-transition case.
@ -1594,0 +1651,4 @@..Default::default()});release(r);@gut0to on GitHub · 2026-11-26 16:17 UTC · original
AI-assisted review; I did not run tests. Could this test release the keys after the held-key assertions, poll again, and verify slot 1 returns exactly to
idlewhile the fallback stays disconnected? The current test covers the initial and key-down states, but the key-up transition must restore the pad stick axes and remove keyboard button/trigger contributions.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.