fix: deliver AutoA taps to the first connected gamepad #318

Open
github-bot wants to merge 4 commits from github-bot/gh-318 into main AGit
Owner

@⁠mauroalvare on GitHub · 2026-11-26 02:44 UTC · original
mauroalvare:codex/victory-auto-a-gamepad → main · +86 −15 · 3 files · 4 commits · open

Change

anyxboxx run --auto-a passes VICTORY_AUTO_A=150 to Neptune. On the base commit, GameInput synthesized Enter for the keyboard and its stand-in gamepad. Connecting an XInput pad disconnects the stand-in, leaving the title's gamepad reads without the automatic A pulse.

Sample the pulse through Source::auto_a and add A to the lowest-numbered connected XInput pad. Physical buttons, triggers and axes are included in that reading. With no XInput pad, the stand-in receives the tap through Enter. Microsoft XInput controller indices

Original verification

Base c4c93bdc413191a9dc909998d2d53080a3f0c880, head 8630cac. Windows PowerShell 5.1, Rust 1.98.1 and Python 3.13.15.

python -m pytest tests/test_lanceur_victory.py -q -rs
26 passed

python -m pytest -rs
1666 passed, 0 skipped

python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools
All checks passed!

# From third_party/victory
cargo test --locked -p victory-hle --lib auto_a_taps_the_first_connected_pad
Base with the regression test: 0 passed, 1 failed (buttons 8, expected 12)
Fix: 1 passed, 0 failed

cargo test --locked -p victory-hle
111 unit tests and 1 integration test passed

cargo test --locked -p victory-hle --features diagnostics --lib gameinput
8 passed

cargo test --locked -p victory-loader --test load_probe
2 passed

cargo xtask policy
asset policy: 199 files ok

The full Python suite used the RTX 5070 Ti (driver 621.40) for hardware tests and WARP for explicit software-adapter checks. C++ runtime, Rust bridge and TomBox binaries were reused from identical source trees and submodule commit. The launcher and GameInput reproductions ran on the CPU.

Oracle and test data

The launcher's existing synthetic executable prints its environment. The release launcher test checks that the child receives VICTORY_AUTO_A=150. The Rust test uses synthetic XInput slots 1 and 3 and reads the state through the title-facing GameInput methods. Slot 1 reported B alone (0x8) on the base and A+B (0xC) with the fix. The test also checks the analog values, the other pad, and the end of the pulse while Enter is held.

Checklist

  • One behavior with a failing regression on the base.
  • Synthetic inputs, the existing GameInput test double, and the hle-probe fixture.
  • Ruff, README consistency and the VIctory asset policy passed.

Investigation, implementation and verification were assisted by OpenAI Codex.

Rebase verification

Rebased on c41c224. cargo test --locked --offline -j 4 -p victory-hle gameinput -- --test-threads=1 passed all 8 GameInput tests. python -m pytest -q -rs tests/test_lanceur_victory.py tests/test_anyxboxx_run.py passed all 28 tests with the release launcher.

**@⁠mauroalvare** on GitHub · 2026-11-26 02:44 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/318) `mauroalvare:codex/victory-auto-a-gamepad` → `main` · +86 −15 · 3 files · 4 commits · open ## Change `anyxboxx run --auto-a` passes `VICTORY_AUTO_A=150` to Neptune. On the base commit, GameInput synthesized Enter for the keyboard and its stand-in gamepad. Connecting an XInput pad disconnects the stand-in, leaving the title's gamepad reads without the automatic A pulse. Sample the pulse through `Source::auto_a` and add A to the lowest-numbered connected XInput pad. Physical buttons, triggers and axes are included in that reading. With no XInput pad, the stand-in receives the tap through Enter. [Microsoft XInput controller indices](https://learn.microsoft.com/en-us/windows/win32/xinput/getting-started-with-xinput#multiple-controllers) ## Original verification Base `c4c93bdc413191a9dc909998d2d53080a3f0c880`, head `8630cac`. Windows PowerShell 5.1, Rust 1.98.1 and Python 3.13.15. ```text python -m pytest tests/test_lanceur_victory.py -q -rs 26 passed python -m pytest -rs 1666 passed, 0 skipped python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools All checks passed! # From third_party/victory cargo test --locked -p victory-hle --lib auto_a_taps_the_first_connected_pad Base with the regression test: 0 passed, 1 failed (buttons 8, expected 12) Fix: 1 passed, 0 failed cargo test --locked -p victory-hle 111 unit tests and 1 integration test passed cargo test --locked -p victory-hle --features diagnostics --lib gameinput 8 passed cargo test --locked -p victory-loader --test load_probe 2 passed cargo xtask policy asset policy: 199 files ok ``` The full Python suite used the RTX 5070 Ti (driver 621.40) for hardware tests and WARP for explicit software-adapter checks. C++ runtime, Rust bridge and TomBox binaries were reused from identical source trees and submodule commit. The launcher and GameInput reproductions ran on the CPU. ## Oracle and test data The launcher's existing synthetic executable prints its environment. The release launcher test checks that the child receives `VICTORY_AUTO_A=150`. The Rust test uses synthetic XInput slots 1 and 3 and reads the state through the title-facing GameInput methods. Slot 1 reported B alone (`0x8`) on the base and A+B (`0xC`) with the fix. The test also checks the analog values, the other pad, and the end of the pulse while Enter is held. ## Checklist - [x] One behavior with a failing regression on the base. - [x] Synthetic inputs, the existing GameInput test double, and the `hle-probe` fixture. - [x] Ruff, README consistency and the VIctory asset policy passed. Investigation, implementation and verification were assisted by OpenAI Codex. ## Rebase verification Rebased on `c41c224`. `cargo test --locked --offline -j 4 -p victory-hle gameinput -- --test-threads=1` passed all 8 GameInput tests. `python -m pytest -q -rs tests/test_lanceur_victory.py tests/test_anyxboxx_run.py` passed all 28 tests with the release launcher.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:42:53 +00:00
Author
Owner

@⁠Exorion1er on GitHub · 2026-11-26 11:04 UTC · original · approved these changes

Thanks! AutoA was already on main (Neptune's start-neptune.ps1 and the launcher's -AutoA switch), so this fixes an existing opt-in path rather than adding behaviour: with VICTORY_AUTO_A unset nothing changes. The regression test reproduces the missing tap with a pad in slot 1, and the fix stays inside the GameInput poll. Small non-blocking nit: the auto-A flag riding on Source::keys() as a tuple could be its own trait method. Approving.

**@⁠Exorion1er** on GitHub · 2026-11-26 11:04 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/318#pullrequestreview-6073004999) · **approved these changes** Thanks! AutoA was already on main (Neptune's `start-neptune.ps1` and the launcher's `-AutoA` switch), so this fixes an existing opt-in path rather than adding behaviour: with `VICTORY_AUTO_A` unset nothing changes. The regression test reproduces the missing tap with a pad in slot 1, and the fix stays inside the GameInput poll. Small non-blocking nit: the auto-A flag riding on `Source::keys()` as a tuple could be its own trait method. Approving.
Author
Owner

@⁠LooperSalty on GitHub · 2026-11-26 14:01 UTC · original

This PR now conflicts with main in tests/test_lanceur_victory.py (other launcher PRs changed the same test module). Please rebase on main, keep the tests of both sides, run python -m pytest tests/test_lanceur_victory.py and force-push your branch.

🤖 Generated with Claude Code

**@⁠LooperSalty** on GitHub · 2026-11-26 14:01 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/318#issuecomment-7194169493) This PR now conflicts with main in `tests/test_lanceur_victory.py` (other launcher PRs changed the same test module). Please rebase on main, keep the tests of both sides, run `python -m pytest tests/test_lanceur_victory.py` and force-push your branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot force-pushed github-bot/gh-318 from d42507ec16 to 1be633ca1c 2026-11-26 18:03:41 +00:00 Compare
Author
Owner

@⁠mauroalvare on GitHub · 2026-11-26 18:25 UTC · original

I rebased the GameInput fix and took the suggestion to expose the tap through a separate Source::auto_a method. The poll samples it once for the keyboard and the first connected controller. The release-launcher test now covers anyxboxx run --auto-a.

All eight GameInput tests and all 28 launcher tests passed.

The latest CI run passed.

**@⁠mauroalvare** on GitHub · 2026-11-26 18:25 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/318#issuecomment-7200446944) I rebased the GameInput fix and took the suggestion to expose the tap through a separate `Source::auto_a` method. The poll samples it once for the keyboard and the first connected controller. The release-launcher test now covers `anyxboxx run --auto-a`. All eight GameInput tests and all 28 launcher tests passed. [The latest CI run passed](https://github.com/LooperSalty/AnyXboxX/actions/runs/45872484847).
github-bot force-pushed github-bot/gh-318 from 1be633ca1c to a0f39f5f21 2026-11-26 19:50:46 +00:00 Compare
github-bot force-pushed github-bot/gh-318 from a0f39f5f21 to f5f532ca21 2026-11-27 00:36:56 +00:00 Compare
Author
Owner

@⁠mauroalvare on GitHub · 2026-11-27 00:49 UTC · original

Updated this branch for the mouse support added by #461. Auto-A still taps the first connected pad, and mouse input still reaches the stand-in pad. All 21 automatic GameInput tests passed, including a new regression that exercises Auto-A and the mouse together.

**@⁠mauroalvare** on GitHub · 2026-11-27 00:49 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/318#issuecomment-7206782054) Updated this branch for the mouse support added by #461. Auto-A still taps the first connected pad, and mouse input still reaches the stand-in pad. All 21 automatic GameInput tests passed, including a new regression that exercises Auto-A and the mouse together.
This pull request has changes conflicting with the target branch.
  • third_party/victory/crates/victory-hle/src/modules/gameinput.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/318/head:github-bot/gh-318'
git switch 'github-bot/gh-318'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-318'
git switch 'github-bot/gh-318'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-318'
git switch 'github-bot/gh-318'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-318'
git switch 'main'
git merge --squash 'github-bot/gh-318'
git switch 'main'
git merge --ff-only 'github-bot/gh-318'
git switch 'main'
git merge 'github-bot/gh-318'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.