Expose the scripted keyboard as GameInput pad 0 when no controller is connected #1175
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!1175
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1175"
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?
@BradRoland on GitHub · 2026-11-25 22:48 UTC · original
BradRoland:codex/scripted-pad-slot-zero→main· +164 −15 · 2 files · 1 commits · openIn #1167 the game’s profile selector ignored
VICTORY_KEYSfor five minutes with no controller plugged in. A local diagnostic experiment got past the screen by keeping pad 0 connected even between scripted keypresses. On main, a synthetic GameInput client that registers a pad callback receives device 4 in this case and cannot read pad 0.When a Windows diagnostics build has a valid
VICTORY_KEYSschedule and all hardware pad slots are empty, the existing keyboard stand-in now occupies GameInput slot 0 for the duration, including gaps between keys. It retains the keyboard mappings for buttons, sticks and triggers. Plugging in a physical controller restores that controller’s input, and a real pad 0 takes over the same logical device. Rumble is forwarded only when a physical pad is available for that slot. The script clock starts at the first input sample, so a0:Enterpress survives a slow initial hardware poll. Empty and invalid schedules use the existing fallback device.The regression drives the parsed key schedule with a synthetic clock and fake source. It checks stable device identity and callbacks, keyboard and pad readings on press and release, plugging and unplugging two different controller slots, and rumble routing. It failed on the original slot-4 enumeration. Reproduce with
cargo test --locked -p victory-hle --features diagnostics scripted_keys_keep_slot_zero -- --nocapture.The Windows HLE crate passed 101 unit tests plus its integration test with diagnostics. Its ordinary build passed 100 unit tests plus its integration test. The profile screen still needs a title replay on this commit. AI-assisted implementation and testing.
@Swagi-REDACTED on GitHub · 2026-11-26 08:17 UTC · original
Tested this together with #1027 on the
46bf5351707b1697c04e5d871c30973ebaa3e973fork baseline, on Windows 11 x64, Ryzen 7 9800X3D (8 logical processors), RTX 3060 12 GB, 16 GB RAM. Game assets remain on an HDD; derived cache/data are on an SSD.Combination result: with
VICTORY_KEYSunset and only a nonemptyVICTORY_KEYS_LIVEpath,fallback_slot()still returned 4. An isolated-process regression reproduced that (left: 4,right: 0); absent and empty paths retained the existing fallback. The integration now selects slot 0 for a nonempty live path too, and ignores an empty live path in the follower. The additional change and regression are in 0d5b483; the preceding commits preserve the original authors of #1027 and this PR.Validation on that source tree:
cargo test --locked --profile diag -p victory-hle --features diagnostics --lib modules::gameinput:: -- --test-threads=1: 13 passed, 0 failed, 0 ignored, no skips. Includes the live parser/queue tests and this PR's hotplug/device-identity test; subprocess checks are additional executions, not extra top-level tests.cargo test --locked -p victory-hle --lib modules::gameinput:: -- --test-threads=1: 7 passed, 0 failed, 0 ignored, no skips.cargo build --locked --profile diag -p victory --features diagnostics: passed.cargo xtask policy: 220 files OK. No game data or captures are in the branch.Local title check: A newer retail game, Series X profile, NVIDIA hardware adapter. With the live-only configuration above, appending one
Enter:500line advanced the displayed profile screen into loading. The runtime logged that one line, and the screen transition was observed. The binary was built from the same tree immediately before the final commit; executable SHA-256CC89A3976827001D2E5EDC3C0457F12B9F839D3DA84F69C32D1DA57F77FAA73D.Movement, camera control, pause, full prologue completion, and the full post-integration workspace/GPU suites are not yet verified. This is a report of the combined configuration, not a standalone validation of either PR or a performance comparison.
AI use: Codex, GPT-6 (exact serving variant not exposed), investigated the integration, wrote its additional regression/fix, and ran these checks. Human GitHub account owns the fork; original patch authors retain their credit.
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.