gameinput, xgameruntime, tools: add scripted input, profile auto-select, and game harness #517
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/517"
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?
Imported from brcly/TuxBox. Originally posted by glovepost on 2026-11-29T18:53:08Z.
Summary
Adds a live scripted input channel to
gameinput, a paired profile auto-select trigger betweenxgameruntimeandgameinput, and an automated game test harness (tools/game_harness.py):runtime/xgameruntime,runtime/gameinput,docs/ENVIRONMENT.md): Arms a per-process manual-reset Win32 event (Local\TuxBoxAutoSelectProfile_<pid>) on theuser_gamertagaccount prompt and disarms it on save enumeration whenTUXBOX_AUTO_SELECT_PROFILEis set, driving periodicApulses ingameinput'sAutoConfirmhelper while keepinghold(...)/missinggrace windows intact.runtime/gameinput/src/{lib.rs,sample.rs,tests/sample.rs},docs/ENVIRONMENT.md): AddsScriptedInput(TUXBOX_INPUT_SCRIPT) reading line-delimited commands (press,down,up,stick,trigger,wait,reset) from a file path or localhost TCP socket to inject controller state alongside live hardware/keyboard input.tools/game_harness.py,tools/scenarios/scarlett_boot_to_gameplay.json,tests/test_game_harness.py): Launches the title via a launch script with scripted input scenarios, frame-hash stall detection, stderr/stdout log matching, and milestone reporting.Prepared with AI assistance; all changes were reviewed and verified on host unit tests, Wine crate unit tests, and both NVIDIA and AMD GPUs.
Tested
Run the checks relevant to this change.
This adds controller input injection,
xgameruntimeaccount-prompt signaling, and a launch harness rather than GPU shader or command-list rendering paths, so no new Lanes scenario applies. Behaviour is covered by the Wine unit tests intuxbox-gameinput(10/10) andtuxbox-xgameruntime(6/6),tests/test_game_harness.py+tests/test_repository_hygiene.py, and thexgameruntime,guest-frame, andpresentverify suites on both NVIDIA and AMD.GPU, driver and backend:
10de:1e84), driver620.73.04, GE-Proton11-14 (vkd3d-proton)1002:13c0), RADV / Mesa26.3.1, GE-Proton11-14 (vkd3d-proton)Commands run and their results:
Checks
CI runs the Python unit tests, the shader compiler, DXBC, and XG layout tests, and a Windows typecheck of
tuxbox-d3d12.Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T04:12:24Z.
Heads-up: main just landed a large cleanup (up to
e5d2e913), so this PR needs a rebase.rustfmt.toml).unwrap(), lossyascasts and undocumentedunsafeoutside tests.cargo fmt --check, rustdoc with warnings denied, and Miri on the providers' unit tests.The least painful way is to format your branch first, so the rebase only shows real changes:
Then run
python tuxbox.py check --no-gpu, which now includes the format step.If clippy flags something new:
Fromfor widening,TryFromfor narrowing, and a mask for bit fields.unwrap(): use?, orexpectwith the reason it can't fail.unsafeblock: it needs a// SAFETY:comment.CONTRIBUTING's "Code checks" section lists the commands. Thanks!
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.