feat(input): Sprint on L3 only while it is held, and its row on the Controls tab #1948

Merged
HumanBean merged 6 commits from llun/Longshot:feat/sprint-hold-l3 into main 2026-11-21 01:56:49 +00:00
Member

Summary

A follow-up to #1929 (Sprint, built on thegrandao's #196), from a hand test of it:

  • L3 sprints only while it is held. In #1929 the left stick's press was a toggle: one press ran until Link stopped. Now Sprint's gamepad button works as its key does: Link runs the fast run while it is held, and letting go gives back the plain run at once. sprint_step (host/nn_hid.c) loses its latch: want is the stick pushed and the key or the button held.
  • The Sprint row moves from the Gameplay tab to the Controls tab, after Walk speed (gpu/vk/menu/sprint.cpp). Its saved key, sprint=, is unchanged, so players' settings carry over.

The texts (the row's help, the Controls page's Sprint line), the user guide's settings table and Sprint paragraph, and tests/test_sprint.py follow.

Read first: sprint_step in host/nn_hid.c, gpu/vk/menu/sprint.cpp.

Testing

Tested: Windows 11, RTX 5080 (621.24), this change at main @ eee3e1d5 (the same code on #1929's merge), headless through the control bridge from the kokiri-start save, child Link in Hyrule Field: the option's tab is controls; holding Sprint (SPRINT) while running forward: 5.30-5.32 m/s, the fast run; let go at frame 100 with the stick still held: 3.45-3.67 m/s, the fast run over. tests/test_sprint.py passes (the pad held, let go while moving, held standing, held again), with test_settings_table, test_menu_modules, test_menu_ini_keys, test_input_background, test_pads_after_menu, test_walk_key and the other menu checks. The whole suite (Windows, llvm-mingw): main @ fc4a6769 712 passed, 64 failed, 128 skipped; this branch the same, the same 64 failing (environment ones here: POSIX-only fixtures, no Vulkan headers, lz4).

Still to test:

  • Windows, an Xbox controller and the keyboard, by hand: the Controls tab's Sprint row on, hold L3 and Shift while moving, expecting the fast run while held and the plain run as soon as either is let go (by hand: the user is testing this build now).

Measurements

Nothing to measure: the per-frame work is one fewer compare (the latch is gone), and #1929 measured Sprint against main within the spread.

Risks

  • Players who turned Sprint on with #1929's toggle now hold L3 instead; nothing else changes. The row keeps its key, so its value is kept; it is found on the Controls tab now.
  • A revert brings the toggle and the Gameplay tab back.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (built on Windows; Linux not built here: the Test Farm)
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary A follow-up to [#1929](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1929) (Sprint, built on thegrandao's [#196](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/196)), from a hand test of it: - **L3 sprints only while it is held.** In #1929 the left stick's press was a toggle: one press ran until Link stopped. Now Sprint's gamepad button works as its key does: Link runs the fast run while it is held, and letting go gives back the plain run at once. `sprint_step` (`host/nn_hid.c`) loses its latch: `want` is the stick pushed and the key or the button held. - **The Sprint row moves from the Gameplay tab to the Controls tab**, after Walk speed (`gpu/vk/menu/sprint.cpp`). Its saved key, `sprint=`, is unchanged, so players' settings carry over. The texts (the row's help, the Controls page's Sprint line), the user guide's settings table and Sprint paragraph, and `tests/test_sprint.py` follow. Read first: `sprint_step` in `host/nn_hid.c`, `gpu/vk/menu/sprint.cpp`. ## Testing **Tested:** Windows 11, RTX 5080 (621.24), this change at `main` @ eee3e1d5 (the same code on #1929's merge), headless through the control bridge from the `kokiri-start` save, child Link in Hyrule Field: the option's `tab` is `controls`; holding Sprint (`SPRINT`) while running forward: 5.30-5.32 m/s, the fast run; let go at frame 100 with the stick still held: 3.45-3.67 m/s, the fast run over. `tests/test_sprint.py` passes (the pad held, let go while moving, held standing, held again), with `test_settings_table`, `test_menu_modules`, `test_menu_ini_keys`, `test_input_background`, `test_pads_after_menu`, `test_walk_key` and the other menu checks. The whole suite (Windows, llvm-mingw): `main` @ fc4a6769 712 passed, 64 failed, 128 skipped; this branch the same, the same 64 failing (environment ones here: POSIX-only fixtures, no Vulkan headers, lz4). **Still to test:** - Windows, an Xbox controller and the keyboard, by hand: the Controls tab's Sprint row on, hold L3 and Shift while moving, expecting the fast run while held and the plain run as soon as either is let go (by hand: the user is testing this build now). ## Measurements Nothing to measure: the per-frame work is one fewer compare (the latch is gone), and #1929 measured Sprint against `main` within the spread. ## Risks - Players who turned Sprint on with #1929's toggle now hold L3 instead; nothing else changes. The row keeps its key, so its value is kept; it is found on the Controls tab now. - A revert brings the toggle and the Gameplay tab back. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (built on Windows; Linux not built here: the Test Farm) - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(input): Sprint runs only while its button is held, and its row is on the Controls tab
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Third-party parts / As their notes say (pull_request) Successful in 17s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 8s
CI / Website build and checks (pull_request) Has been cancelled
3bc1dbfb0f
From the user's hand test: the left stick's press was a toggle (one press ran until Link stopped). Now Sprint's gamepad
input works as its key does: Link runs only while it is held, and letting go gives back the plain run at once. The row
moves from the Gameplay tab to the Controls tab, after Walk speed (its key, sprint=, stays). Texts, the user guide and
tests/test_sprint.py follow (the pad held, let go while moving, held standing, held again).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RTX 5080, headless from the kokiri-start save, child Link in Hyrule Field: the Sprint row's tab is controls; Sprint held while running: 5.30-5.32 m/s, the fast run; let go with the stick still held: 3.45-3.67 m/s, the fast run over.

Tested in game: Windows 11, RTX 5080, headless from the kokiri-start save, child Link in Hyrule Field: the Sprint row's tab is controls; Sprint held while running: 5.30-5.32 m/s, the fast run; let go with the stick still held: 3.45-3.67 m/s, the fast run over.
llun changed title from WIP: feat(input): Sprint on L3 only while it is held, and its row on the Controls tab to feat(input): Sprint on L3 only while it is held, and its row on the Controls tab 2026-11-21 01:13:26 +00:00
Member

Possibly related, for context:

  • issue #1047 Idea: Let Run be mapped to L3 — Open request to map Run to L3; the Sprint L3 control substantially addresses it.
Possibly related, for context: - issue #1047 Idea: Let Run be mapped to L3 — Open request to map Run to L3; the Sprint L3 control substantially addresses it.
Author
Member

Back to WIP: the Linux build box applies (host code changed) and can't be settled on this PC; it waits for a Test Farm Linux report on this head. Everything else is ready.

Back to WIP: the Linux build box applies (host code changed) and can't be settled on this PC; it waits for a Test Farm Linux report on this head. Everything else is ready.
llun changed title from feat(input): Sprint on L3 only while it is held, and its row on the Controls tab to WIP: feat(input): Sprint on L3 only while it is held, and its row on the Controls tab 2026-11-21 01:13:40 +00:00
Author
Member
@fix
BeanBot left a comment

Recommendation: Request changes. Hold-to-sprint simplifies the input logic and makes the setting easier to find, but releasing L3 and pressing A in the same input sample can swallow the roll or action. Fix that handoff and verify physical L3 on the reviewed build.

Players with Sprint enabled now hold L3 while steering and find Sprint below Walk speed on the Controls tab. The change removes the latch and keeps existing settings and bindings. Players who used the toggle now have to keep the stick clicked while steering.

Does it help: Unproven for physical L3. The reported Windows 11 run on an RTX 5080 showed 5.30–5.32 m/s while scripted Sprint was held and 3.45–3.67 m/s after release. The bridge injects SPRINT_KEY, which already used hold behavior on the base. The report names eee3e1d5, which precedes #1929, so it needs to identify the patched build. This is an input behavior change.
Other systems: The same host path serves Windows and Linux, including Steam Deck. SDL and XInput feed the pad state before Sprint is applied, so physical controller coverage matters. The HUD shortcut and post-menu release gates still filter pad input, and the Insert menu and ocarina note wait still suppress Sprint. The diff changes no GPU command, memory allocation, audio, save or build path. The menu edits do affect the guide screenshot source check.
Switches: No environment switches added, changed or removed. The existing Sprint setting keeps sprint= and defaults to Off, which preserves stock bindings for players who leave it disabled. Existing enabled settings now use hold behavior for gamepad Sprint.

Reviewed: 3bc1dbfb0f against fc4a6769fd: Read all six file diffs and the sole commit, AGENTS.md, CONTRIBUTING.md, the Forgejo template and developer standards. Read sprint.cpp, test_sprint.py and graphics-and-controls.md in full. Read the changed regions and relevant surrounding code in nn_hid.c, vk_api.h and vk_menu.cpp, including binding setup, controller sampling, the A-press patch, menu writes, bridge dispatch and the renderer option read. Read the screenshot review rules and checker, and skimmed the manifest, translation tables, related test fixtures and recorded results. Unrelated regions of the larger host and renderer files were outside the review. No separate review checklist was present.; nothing run (a code review).
Checked and fine:

  • The registered row uses the Controls anchor and sorts directly after Walk speed. The guide's settings table matches that order.
  • The saved sprint key, binding keys and preset exemption carry forward. The vk_api.h edit only changes a comment, so no interface version bump is due.
  • The extracted step test checks the actual A output and press mask. Restoring the pad latch would fail its release-while-steering assertion.
  • The commit has its AI assistance trailer. The diff adds no game-derived material, generated files or third-party changes.

Blocking (to change before merge)

  1. host/nn_hid.c:972: Release L3 and tap A in the same input sample while still steering. The new want becomes false, clearing running before the code can schedule the A gap. The game sees A remain held across both samples and misses the roll or action. Base's pad latch kept want true in this case. Schedule the gap from whether Sprint supplied A on the previous sample, even if Sprint was released in the current one. Add a test for the simultaneous release and tap.
  2. host/nn_hid.c:1397: The Sprint gate inherits an unsynchronized read of opts.sprint through the renderer callback. The bridge can change sprint while the game polls, and menu_mu only covers the writer. The writer also updates the row before applying its binding changes. Publish a synchronized runtime value after loading or applying Sprint's bindings, and have input read a consistent enable state and binding layout.
  3. gpu/vk/menu/sprint.cpp:77: The control bridge reference and developer guide still send testers to Gameplay to enable SPRINT. A tester following either document will look on the wrong tab. Update docs/dev/reference/control-bridge.md and docs/dev/developing.md to point to Controls.
  4. gpu/vk/vk_menu.cpp:2548: The guide screenshot workflow hashes vk_menu.cpp and vk_api.h as inputs for settings-graphics.png. Those hashes were already stale on the base and this PR changes both inputs again. Compare the published Graphics view with the current UI and record the reviewed source hashes and comparison. Recapture only if the published view needs it.
  5. tests/test_sprint.py: Both compiled fixtures ignore CC, and the binding fixture also ignores CXX. On a machine where the selected llvm-mingw tools are outside PATH, the regression checks can skip or use a different compiler. Honor the configured toolchain. The binding fixture also passes the absolute temp directory through narrow argv and fixed-size path buffers. A Windows temp path outside the active code page can lose the fixture, and a long path can make the mock path helper index beyond its buffer. Run the fixture in each case directory and open the INI by a short relative name.
  6. tests/test_sprint.py:14: The inherited LIFTED fixture is described as a cut-down controller update emitted by the lifter. The no-game-files rule covers sampled lifted output, including small test fixtures. Replace it with independently authored synthetic input that exercises the same matcher and notify a maintainer about the sample already on main.

Waiting on the author (a run, a measurement or a decision; no edit does it)

  • The recorded run exercises the keyboard-equivalent bridge bit and names an ancestor from before #1929. Record the actual tested revision, then compare the base and the updated head with a physical Xbox controller and keyboard on Windows and with a controller on Linux or Steam Deck. Include release while steering, the A-button handoff, the Sprint row with Off and On, and the required before-and-after menu screenshots. Report lint and CI on the updated head and identify the baseline-equivalent suite failures.

Testing: Read-only review. The author reports passing Sprint and related input and menu checks, and 712 passed, 64 failed and 128 skipped on both Windows runs. The controller and keyboard hand test is still pending. Read the release assertion against the base latch and the new hold condition to verify that it distinguishes them.
Overlaps and merge order: #1929 is already merged at the review base and supplies Sprint. #196 is the original implementation carried by #1929. No additional merge dependency was identified from the checkout and supplied discussion.


Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** Hold-to-sprint simplifies the input logic and makes the setting easier to find, but releasing L3 and pressing A in the same input sample can swallow the roll or action. Fix that handoff and verify physical L3 on the reviewed build. Players with Sprint enabled now hold L3 while steering and find Sprint below Walk speed on the Controls tab. The change removes the latch and keeps existing settings and bindings. Players who used the toggle now have to keep the stick clicked while steering. **Does it help:** Unproven for physical L3. The reported Windows 11 run on an RTX 5080 showed 5.30–5.32 m/s while scripted Sprint was held and 3.45–3.67 m/s after release. The bridge injects SPRINT_KEY, which already used hold behavior on the base. The report names eee3e1d5, which precedes #1929, so it needs to identify the patched build. This is an input behavior change. **Other systems:** The same host path serves Windows and Linux, including Steam Deck. SDL and XInput feed the pad state before Sprint is applied, so physical controller coverage matters. The HUD shortcut and post-menu release gates still filter pad input, and the Insert menu and ocarina note wait still suppress Sprint. The diff changes no GPU command, memory allocation, audio, save or build path. The menu edits do affect the guide screenshot source check. **Switches:** No environment switches added, changed or removed. The existing Sprint setting keeps sprint= and defaults to Off, which preserves stock bindings for players who leave it disabled. Existing enabled settings now use hold behavior for gamepad Sprint. **Reviewed:** 3bc1dbfb0ffc against fc4a6769fd69: Read all six file diffs and the sole commit, AGENTS.md, CONTRIBUTING.md, the Forgejo template and developer standards. Read sprint.cpp, test_sprint.py and graphics-and-controls.md in full. Read the changed regions and relevant surrounding code in nn_hid.c, vk_api.h and vk_menu.cpp, including binding setup, controller sampling, the A-press patch, menu writes, bridge dispatch and the renderer option read. Read the screenshot review rules and checker, and skimmed the manifest, translation tables, related test fixtures and recorded results. Unrelated regions of the larger host and renderer files were outside the review. No separate review checklist was present.; nothing run (a code review). **Checked and fine:** - The registered row uses the Controls anchor and sorts directly after Walk speed. The guide's settings table matches that order. - The saved sprint key, binding keys and preset exemption carry forward. The vk_api.h edit only changes a comment, so no interface version bump is due. - The extracted step test checks the actual A output and press mask. Restoring the pad latch would fail its release-while-steering assertion. - The commit has its AI assistance trailer. The diff adds no game-derived material, generated files or third-party changes. **Blocking** (to change before merge) 1. host/nn_hid.c:972: Release L3 and tap A in the same input sample while still steering. The new want becomes false, clearing running before the code can schedule the A gap. The game sees A remain held across both samples and misses the roll or action. Base's pad latch kept want true in this case. Schedule the gap from whether Sprint supplied A on the previous sample, even if Sprint was released in the current one. Add a test for the simultaneous release and tap. 2. host/nn_hid.c:1397: The Sprint gate inherits an unsynchronized read of opts.sprint through the renderer callback. The bridge can change sprint while the game polls, and menu_mu only covers the writer. The writer also updates the row before applying its binding changes. Publish a synchronized runtime value after loading or applying Sprint's bindings, and have input read a consistent enable state and binding layout. 3. gpu/vk/menu/sprint.cpp:77: The control bridge reference and developer guide still send testers to Gameplay to enable SPRINT. A tester following either document will look on the wrong tab. Update docs/dev/reference/control-bridge.md and docs/dev/developing.md to point to Controls. 4. gpu/vk/vk_menu.cpp:2548: The guide screenshot workflow hashes vk_menu.cpp and vk_api.h as inputs for settings-graphics.png. Those hashes were already stale on the base and this PR changes both inputs again. Compare the published Graphics view with the current UI and record the reviewed source hashes and comparison. Recapture only if the published view needs it. 5. tests/test_sprint.py: Both compiled fixtures ignore CC, and the binding fixture also ignores CXX. On a machine where the selected llvm-mingw tools are outside PATH, the regression checks can skip or use a different compiler. Honor the configured toolchain. The binding fixture also passes the absolute temp directory through narrow argv and fixed-size path buffers. A Windows temp path outside the active code page can lose the fixture, and a long path can make the mock path helper index beyond its buffer. Run the fixture in each case directory and open the INI by a short relative name. 6. tests/test_sprint.py:14: The inherited LIFTED fixture is described as a cut-down controller update emitted by the lifter. The no-game-files rule covers sampled lifted output, including small test fixtures. Replace it with independently authored synthetic input that exercises the same matcher and notify a maintainer about the sample already on main. **Waiting on the author** (a run, a measurement or a decision; no edit does it) - The recorded run exercises the keyboard-equivalent bridge bit and names an ancestor from before #1929. Record the actual tested revision, then compare the base and the updated head with a physical Xbox controller and keyboard on Windows and with a controller on Linux or Steam Deck. Include release while steering, the A-button handoff, the Sprint row with Off and On, and the required before-and-after menu screenshots. Report lint and CI on the updated head and identify the baseline-equivalent suite failures. **Testing:** Read-only review. The author reports passing Sprint and related input and menu checks, and 712 passed, 64 failed and 128 skipped on both Windows runs. The controller and keyboard hand test is still pending. Read the release assertion against the base latch and the new hold condition to verify that it distinguishes them. **Overlaps and merge order:** #1929 is already merged at the review base and supplies Sprint. #196 is the original implementation carried by #1929. No additional merge dependency was identified from the checkout and supplied discussion. --- <sub>Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.</sub>
@ -75,3 +75,3 @@
MENU_MODULE(sprint) {
menu::tab("gameplay")
menu::tab("controls")
Member

The developer guide and control bridge reference still tell testers to enable Sprint on Gameplay. Update both to Controls.

The developer guide and control bridge reference still tell testers to enable Sprint on Gameplay. Update both to Controls.
@ -79,3 +79,2 @@
.label = "Sprint",
.help = "Link runs while you move: Shift held, or the left stick pressed once until you stop, without rolling, "
"talking or picking things up. Turning it on changes your controls: Shift moves from B to Sprint (B goes "
.help = "Link runs while you move and hold Shift, or the left stick pressed in, without rolling, talking or "
Member

Consider “Hold Shift or click and hold the left stick while moving.”

Consider “Hold Shift or click and hold the left stick while moving.”
@ -2547,3 +2547,2 @@
: sel_i < kControls && controls[sel_i].button == HOS_KEY_SPRINT
? "Link runs while you move: the key while it is held, the gamepad button pressed once until you "
"stop, without rolling, talking or picking things up. Only with the Gameplay tab's Sprint row on, "
? "Link runs while you move and hold the key or the gamepad button, without rolling, talking or "
Member

The guide screenshot workflow fingerprints this file and vk_api.h. Review the published Graphics view and update the recorded source review.

The guide screenshot workflow fingerprints this file and vk_api.h. Review the published Graphics view and update the recorded source review.
host/nn_hid.c Outdated
@ -974,3 +972,1 @@
else if (pad && !was_pad) latched = 1; /* (pressed while he moves) */
was_pad = pad;
const int want = steered && !paused && (latched || (held & SPRINT_KEY));
const int want = steered && !paused && (held & (SPRINT_KEY | SPRINT_PAD)); /* (only while held) */
Member

Releasing L3 and tapping A in the same sample skips the A gap. Preserve the press based on whether Sprint supplied A on the previous sample, and test this transition.

Releasing L3 and tapping A in the same sample skips the A gap. Preserve the press based on whether Sprint supplied A on the previous sample, and test this transition.
host/nn_hid.c Outdated
@ -1401,1 +1394,4 @@
/* Sprint (the Controls page's line; the Controls tab's Sprint row on gives it Shift and the left stick's press): A
held, only while Sprint's key or button is held and the left stick is pushed (standing still, A would talk, open,
pick up), started without the roll (sprint_step). The row off (the default): its key and button do nothing */
const int sprint_held = rx_option(HOS_OPT_SPRINT, 0) ? sprint_now : 0;
Member

This reads opts.sprint without synchronizing with the bridge or menu writer. Publish the runtime flag and its binding layout together so input sees one consistent state.

This reads opts.sprint without synchronizing with the bridge or menu writer. Publish the runtime flag and its binding layout together so input sees one consistent state.
@ -13,2 +12,3 @@
wants a new press while he moves, hos_sprint_press_mask A's bit while it is Sprint's A (not the player's own), the
sprint_step is compiled alone: A only while steered and the key or the gamepad input held (let go, the plain run again),
hos_sprint_press_mask A's bit while it is Sprint's A (not the player's own), the
player's own A mid-sprint a gap and then a press of theirs (a tap shorter than the gap too). nx2/oot_patches.py patch_sprint_press runs on lifted text: the mask goes
Member

Replace the inherited lifted-text sample with independently authored synthetic input. The repository rule covers sampled lift output in fixtures.

Replace the inherited lifted-text sample with independently authored synthetic input. The repository rule covers sampled lift output in fixtures.
Author
Member
@fix
Member

I changed this pull request where the review's points could be done here (the rest needs runs, measurements or decisions): the new head is d1ad085193. It was already up to date with main.

Changed

  • Sprint release and A tap: host/nn_hid.c:981 schedules the gap from the previous Sprint-supplied A; tests/test_sprint.py:321 adds the simultaneous release and tap case. Tests were not run.
  • Sprint documentation tab: docs/dev/reference/control-bridge.md:123 and docs/dev/developing.md:334 now point to Controls.
  • Fixture toolchains and paths: tests/test_sprint.py:33 honors CC and CXX, and tests/test_sprint.py:247 runs binding cases in their own directories using a relative INI path. Tests were not run.
  • Repeated A tap during owed interval: Track whether Sprint supplied A independently of the owed interval in host/nn_hid.c:1001; added a repeated-tap regression case in tests/test_sprint.py:351.
  • Synthetic fixture depends on matcher constants: Authored the expected function headers and instruction pair independently in tests/test_sprint.py:394. No tests were run, as requested; git diff --check passed.

Left for the author

  • Synchronize Sprint state and bindings: The synchronization fix remains incomplete. The author must publish the enable state together with the binding layout and make input read a consistent snapshot. I inspected the renderer callback, menu mutex, and host binding locks; the current callback still reads opts.sprint unsynchronized.
  • Graphics screenshot source review: The author must compare the published Graphics screenshot with the current UI, record the reviewed source hashes and comparison, and recapture if needed. I inspected the manifest and prior review; the requested comparison was not performed because running the UI is prohibited here.
  • Replace sampled lifted fixture: tests/test_sprint.py:379 replaces the sampled fixture with synthetic matcher input. The author must notify a maintainer that the sampled output is already on main; no notification was sent.

Still for the author (from the review)

  • The recorded run exercises the keyboard-equivalent bridge bit and names an ancestor from before #1929. Record the actual tested revision, then compare the base and the updated head with a physical Xbox controller and keyboard on Windows and with a controller on Linux or Steam Deck. Include release while steering, the A-button handoff, the Sprint row with Off and On, and the required before-and-after menu screenshots. Report lint and CI on the updated head and identify the baseline-equivalent suite failures.

Nothing was built or run: check the change. It will be reviewed again.


Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

I changed this pull request where the review's points could be done here (the rest needs runs, measurements or decisions): the new head is d1ad085193da. It was already up to date with `main`. **Changed** - **Sprint release and A tap**: host/nn_hid.c:981 schedules the gap from the previous Sprint-supplied A; tests/test_sprint.py:321 adds the simultaneous release and tap case. Tests were not run. - **Sprint documentation tab**: docs/dev/reference/control-bridge.md:123 and docs/dev/developing.md:334 now point to Controls. - **Fixture toolchains and paths**: tests/test_sprint.py:33 honors CC and CXX, and tests/test_sprint.py:247 runs binding cases in their own directories using a relative INI path. Tests were not run. - **Repeated A tap during owed interval**: Track whether Sprint supplied A independently of the owed interval in host/nn_hid.c:1001; added a repeated-tap regression case in tests/test_sprint.py:351. - **Synthetic fixture depends on matcher constants**: Authored the expected function headers and instruction pair independently in tests/test_sprint.py:394. No tests were run, as requested; git diff --check passed. **Left for the author** - **Synchronize Sprint state and bindings**: The synchronization fix remains incomplete. The author must publish the enable state together with the binding layout and make input read a consistent snapshot. I inspected the renderer callback, menu mutex, and host binding locks; the current callback still reads opts.sprint unsynchronized. - **Graphics screenshot source review**: The author must compare the published Graphics screenshot with the current UI, record the reviewed source hashes and comparison, and recapture if needed. I inspected the manifest and prior review; the requested comparison was not performed because running the UI is prohibited here. - **Replace sampled lifted fixture**: tests/test_sprint.py:379 replaces the sampled fixture with synthetic matcher input. The author must notify a maintainer that the sampled output is already on main; no notification was sent. **Still for the author** (from the review) - The recorded run exercises the keyboard-equivalent bridge bit and names an ancestor from before #1929. Record the actual tested revision, then compare the base and the updated head with a physical Xbox controller and keyboard on Windows and with a controller on Linux or Steam Deck. Include release while steering, the A-button handoff, the Sprint row with Off and On, and the required before-and-after menu screenshots. Report lint and CI on the updated head and identify the baseline-equivalent suite failures. Nothing was built or run: check the change. It will be reviewed again. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
fix(input): preserve Sprint A handoff and update fixtures
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
PR description / Description follows the template (pull_request_target) Successful in 14s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 16s
CI / Website build and checks (pull_request) Has been cancelled
d1ad085193
As the review on #1948 asked.
BeanBot left a comment

Recommendation: Request changes. The A-button handoff now preserves a tap when L3 is released, but input polling can still race a Sprint setting change and see a partial binding layout. The reported bridge run leaves physical L3 behavior on the updated head unverified.

Players with Sprint enabled now hold L3 while steering and find Sprint under Controls, directly after Walk speed. The change removes the pad latch, preserves saved settings and bindings, and adds coverage for the A-button handoff. Players who used the toggle now have to keep the stick clicked while steering.

Since the last review (on 3bc1dbfb0f)
Resolved:

  • host/nn_hid.c:972: Release L3 and tap A in the same input sample while still steering. The new want becomes false, clearing running before the code can schedule the A gap. The game sees A remain held across both samples and misses the roll or action. Base's pad latch kept want true in this case. Sch (host/nn_hid.c:981 schedules the gap from whether the preceding sample supplied A. tests/test_sprint.py:321 covers concurrent L3 release and a short A tap.)
  • gpu/vk/menu/sprint.cpp:77: The control bridge reference and developer guide still send testers to Gameplay to enable SPRINT. A tester following either document will look on the wrong tab. Update docs/dev/reference/control-bridge.md and docs/dev/developing.md to point to Controls. (docs/dev/developing.md:334 and docs/dev/reference/control-bridge.md:123 both direct testers to Controls.)
  • tests/test_sprint.py: Both compiled fixtures ignore CC, and the binding fixture also ignores CXX. On a machine where the selected llvm-mingw tools are outside PATH, the regression checks can skip or use a different compiler. Honor the configured toolchain. The binding fixture also passes the absolut (tests/test_sprint.py:33 reads CC and CXX, and the binding cases use their own working directories with a relative INI name. The Windows argument parsing added by the fix has a separate issue below.)
    Still open:
  • host/nn_hid.c:1397: The Sprint gate inherits an unsynchronized read of opts.sprint through the renderer callback. The bridge can change sprint while the game polls, and menu_mu only covers the writer. The writer also updates the row before applying its binding changes. Publish a synchronized runtime (The input gate still reads opts.sprint through the renderer callback, separately from binding sampling and without the writer's synchronization.)
  • gpu/vk/vk_menu.cpp:2548: The guide screenshot workflow hashes vk_menu.cpp and vk_api.h as inputs for settings-graphics.png. Those hashes were already stale on the base and this PR changes both inputs again. Compare the published Graphics view with the current UI and record the reviewed source hashes (The Graphics screenshot manifest still lacks a comparison and updated source review for the edited menu files.)
  • tests/test_sprint.py:14: The inherited LIFTED fixture is described as a cut-down controller update emitted by the lifter. The no-game-files rule covers sampled lifted output, including small test fixtures. Replace it with independently authored synthetic input that exercises the same matcher and not (The sampled fixture is replaced at HEAD with independently authored matcher input. Maintainer notification about the sample already on main remains outstanding.)
  • The recorded run exercises the keyboard-equivalent bridge bit and names an ancestor from before #1929. Record the actual tested revision, then compare the base and the updated head with a physical Xbox controller and keyboard on Windows and with a controller on Linux or Steam Deck. Include release w (The supplied results still cite eee3e1d5 and bridge SPRINT. Physical input results, menu screenshots, Linux build coverage and the requested check results for the updated head are pending.)
    New:
  • tests/test_sprint.py:38: The Windows compiler parser splits a valid setting such as CC=clang -I"C:\Program Files\SDK" inside the include path. That can fail the fixture build even when clang is available. Use Windows-compatible argument parsing for compiler commands that include flags, while retaining support for a bare executable path.

Does it help: Unproven for physical L3. The reported Windows 11 and RTX 5080 run in Hyrule Field measured 5.30–5.32 m/s with bridge Sprint held and 3.45–3.67 m/s after release. The bridge injects the keyboard-equivalent bit, which already used hold behavior on the base. The named revision eee3e1d5 predates #1929. This is an input behavior change.
Other systems: Windows SDL and XInput and Linux SDL, including Steam Deck, feed the shared Sprint path. The HUD shortcut and post-menu release gates still filter pad inputs, and the Insert menu and ocarina note wait still suppress Sprint. The diff leaves GPU commands, allocations, audio, saves and the game build path unchanged. Shared menu inputs also affect the Graphics screenshot source check and the published guide.
Switches: No environment switches. The existing Sprint option keeps sprint= and defaults to Off, which preserves stock bindings by default. Saved On values now use hold behavior for gamepad Sprint.

Reviewed: d1ad085193 against fc4a6769fd: Read AGENTS.md, CONTRIBUTING.md, the Forgejo template and developer standards. Reviewed both commits, the eight file diffs against fc4a6769fd and the four changed diffs against 3bc1dbfb0f. Read sprint.cpp and test_sprint.py in full, the affected guide and developer documentation sections, and the changed regions and relevant callers in nn_hid.c, vk_api.h, vk_menu.cpp, vk_replay.cpp, oot_patches.py and the binding fixture. Skimmed screenshot records, translations and reported runs. The separate review checklist and sibling Tooling checkout were absent. Unrelated portions of the larger source files were outside the review.; nothing run (a code review).
Checked and fine:

  • The Controls anchor places Sprint immediately after Walk speed, and the settings table follows that order.
  • The saved key, binding keys and preset exemption carry forward. The vk_api.h change is a comment, so the interface version can stay.
  • The step fixture checks actual A output and the press mask. Restoring the pad latch would fail its release-while-steering assertion. The new tests cover the simultaneous release and tap and a second tap during the owed interval.
  • The synthetic fixture supplies matcher input independently and retains the placement, unmatched function, drift, body boundary and idempotence checks.
  • The diff stays on Sprint and its review fixes. It adds no game files, generated output, third-party edits, downloads or repository-external operations beyond compiling and running the documented temporary fixtures.

Blocking (to change before merge)

  1. host/nn_hid.c:1397: While the bridge enables Sprint, input can read the plain opts.sprint value concurrently with the write and sample the old or partly moved Shift and L3 bindings. Publish the enable value and binding layout together after a load or setting change, and have input use one synchronized snapshot.
  2. tests/test_sprint.py:38: The Windows compiler parser splits a valid setting such as CC=clang -I"C:\Program Files\SDK" inside the include path. That can fail the fixture build even when clang is available. Use Windows-compatible argument parsing for compiler commands that include flags, while retaining support for a bare executable path.

Waiting on the author (a run, a measurement or a decision; no edit does it)

  • gpu/vk/vk_menu.cpp:2548: The Graphics guide screenshot tracks vk_menu.cpp and vk_api.h, and its reviewed hashes are stale. The source check will flag the edited inputs even if the visible Graphics view still matches. Compare the published image with the current UI, record the comparison and reviewed hashes, and recapture if the view differs.
  • HEAD uses a synthetic fixture, but the sampled fixture is already on main and the fix report confirms no maintainer was notified. Notify a maintainer so they can decide how to handle the existing material.
  • Identify the revision used for the bridge run. Compare the base and updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Exercise release while steering, the A handoff and Sprint Off and On, and include before-and-after menu screenshots. Report the Linux build, applicable Tier 1 coverage, lint and CI on the updated head, and name the baseline-equivalent suite failures.

Testing: Read-only review. git diff --check passed. The author reported 712 passed, 64 failed and 128 skipped on both Windows revisions, with the same failure count and broad environment categories. No build, lint, tests or game runs were performed for this review. The supplied evidence includes no final-head Linux, physical-controller or CI result.
Overlaps and merge order: #1929 is already in the merge base and includes the Sprint work from #196. No additional merge dependency was identified. Issue #1047 is related.


Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The A-button handoff now preserves a tap when L3 is released, but input polling can still race a Sprint setting change and see a partial binding layout. The reported bridge run leaves physical L3 behavior on the updated head unverified. Players with Sprint enabled now hold L3 while steering and find Sprint under Controls, directly after Walk speed. The change removes the pad latch, preserves saved settings and bindings, and adds coverage for the A-button handoff. Players who used the toggle now have to keep the stick clicked while steering. **Since the last review** (on 3bc1dbfb0ffc) Resolved: - host/nn_hid.c:972: Release L3 and tap A in the same input sample while still steering. The new want becomes false, clearing running before the code can schedule the A gap. The game sees A remain held across both samples and misses the roll or action. Base's pad latch kept want true in this case. Sch (host/nn_hid.c:981 schedules the gap from whether the preceding sample supplied A. tests/test_sprint.py:321 covers concurrent L3 release and a short A tap.) - gpu/vk/menu/sprint.cpp:77: The control bridge reference and developer guide still send testers to Gameplay to enable SPRINT. A tester following either document will look on the wrong tab. Update docs/dev/reference/control-bridge.md and docs/dev/developing.md to point to Controls. (docs/dev/developing.md:334 and docs/dev/reference/control-bridge.md:123 both direct testers to Controls.) - tests/test_sprint.py: Both compiled fixtures ignore CC, and the binding fixture also ignores CXX. On a machine where the selected llvm-mingw tools are outside PATH, the regression checks can skip or use a different compiler. Honor the configured toolchain. The binding fixture also passes the absolut (tests/test_sprint.py:33 reads CC and CXX, and the binding cases use their own working directories with a relative INI name. The Windows argument parsing added by the fix has a separate issue below.) Still open: - host/nn_hid.c:1397: The Sprint gate inherits an unsynchronized read of opts.sprint through the renderer callback. The bridge can change sprint while the game polls, and menu_mu only covers the writer. The writer also updates the row before applying its binding changes. Publish a synchronized runtime (The input gate still reads opts.sprint through the renderer callback, separately from binding sampling and without the writer's synchronization.) - gpu/vk/vk_menu.cpp:2548: The guide screenshot workflow hashes vk_menu.cpp and vk_api.h as inputs for settings-graphics.png. Those hashes were already stale on the base and this PR changes both inputs again. Compare the published Graphics view with the current UI and record the reviewed source hashes (The Graphics screenshot manifest still lacks a comparison and updated source review for the edited menu files.) - tests/test_sprint.py:14: The inherited LIFTED fixture is described as a cut-down controller update emitted by the lifter. The no-game-files rule covers sampled lifted output, including small test fixtures. Replace it with independently authored synthetic input that exercises the same matcher and not (The sampled fixture is replaced at HEAD with independently authored matcher input. Maintainer notification about the sample already on main remains outstanding.) - The recorded run exercises the keyboard-equivalent bridge bit and names an ancestor from before #1929. Record the actual tested revision, then compare the base and the updated head with a physical Xbox controller and keyboard on Windows and with a controller on Linux or Steam Deck. Include release w (The supplied results still cite eee3e1d5 and bridge SPRINT. Physical input results, menu screenshots, Linux build coverage and the requested check results for the updated head are pending.) New: - tests/test_sprint.py:38: The Windows compiler parser splits a valid setting such as CC=clang -I"C:\Program Files\SDK" inside the include path. That can fail the fixture build even when clang is available. Use Windows-compatible argument parsing for compiler commands that include flags, while retaining support for a bare executable path. **Does it help:** Unproven for physical L3. The reported Windows 11 and RTX 5080 run in Hyrule Field measured 5.30–5.32 m/s with bridge Sprint held and 3.45–3.67 m/s after release. The bridge injects the keyboard-equivalent bit, which already used hold behavior on the base. The named revision eee3e1d5 predates #1929. This is an input behavior change. **Other systems:** Windows SDL and XInput and Linux SDL, including Steam Deck, feed the shared Sprint path. The HUD shortcut and post-menu release gates still filter pad inputs, and the Insert menu and ocarina note wait still suppress Sprint. The diff leaves GPU commands, allocations, audio, saves and the game build path unchanged. Shared menu inputs also affect the Graphics screenshot source check and the published guide. **Switches:** No environment switches. The existing Sprint option keeps sprint= and defaults to Off, which preserves stock bindings by default. Saved On values now use hold behavior for gamepad Sprint. **Reviewed:** d1ad085193da against fc4a6769fd69: Read AGENTS.md, CONTRIBUTING.md, the Forgejo template and developer standards. Reviewed both commits, the eight file diffs against fc4a6769fd69 and the four changed diffs against 3bc1dbfb0ffc. Read sprint.cpp and test_sprint.py in full, the affected guide and developer documentation sections, and the changed regions and relevant callers in nn_hid.c, vk_api.h, vk_menu.cpp, vk_replay.cpp, oot_patches.py and the binding fixture. Skimmed screenshot records, translations and reported runs. The separate review checklist and sibling Tooling checkout were absent. Unrelated portions of the larger source files were outside the review.; nothing run (a code review). **Checked and fine:** - The Controls anchor places Sprint immediately after Walk speed, and the settings table follows that order. - The saved key, binding keys and preset exemption carry forward. The vk_api.h change is a comment, so the interface version can stay. - The step fixture checks actual A output and the press mask. Restoring the pad latch would fail its release-while-steering assertion. The new tests cover the simultaneous release and tap and a second tap during the owed interval. - The synthetic fixture supplies matcher input independently and retains the placement, unmatched function, drift, body boundary and idempotence checks. - The diff stays on Sprint and its review fixes. It adds no game files, generated output, third-party edits, downloads or repository-external operations beyond compiling and running the documented temporary fixtures. **Blocking** (to change before merge) 1. host/nn_hid.c:1397: While the bridge enables Sprint, input can read the plain opts.sprint value concurrently with the write and sample the old or partly moved Shift and L3 bindings. Publish the enable value and binding layout together after a load or setting change, and have input use one synchronized snapshot. 2. tests/test_sprint.py:38: The Windows compiler parser splits a valid setting such as CC=clang -I"C:\Program Files\SDK" inside the include path. That can fail the fixture build even when clang is available. Use Windows-compatible argument parsing for compiler commands that include flags, while retaining support for a bare executable path. **Waiting on the author** (a run, a measurement or a decision; no edit does it) - gpu/vk/vk_menu.cpp:2548: The Graphics guide screenshot tracks vk_menu.cpp and vk_api.h, and its reviewed hashes are stale. The source check will flag the edited inputs even if the visible Graphics view still matches. Compare the published image with the current UI, record the comparison and reviewed hashes, and recapture if the view differs. - HEAD uses a synthetic fixture, but the sampled fixture is already on main and the fix report confirms no maintainer was notified. Notify a maintainer so they can decide how to handle the existing material. - Identify the revision used for the bridge run. Compare the base and updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Exercise release while steering, the A handoff and Sprint Off and On, and include before-and-after menu screenshots. Report the Linux build, applicable Tier 1 coverage, lint and CI on the updated head, and name the baseline-equivalent suite failures. **Testing:** Read-only review. git diff --check passed. The author reported 712 passed, 64 failed and 128 skipped on both Windows revisions, with the same failure count and broad environment categories. No build, lint, tests or game runs were performed for this review. The supplied evidence includes no final-head Linux, physical-controller or CI result. **Overlaps and merge order:** #1929 is already in the merge base and includes the Sprint work from #196. No additional merge dependency was identified. Issue #1047 is related. --- <sub>Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
host/nn_hid.c Outdated
@ -1401,1 +1394,4 @@
/* Sprint (the Controls page's line; the Controls tab's Sprint row on gives it Shift and the left stick's press): A
held, only while Sprint's key or button is held and the left stick is pushed (standing still, A would talk, open,
pick up), started without the roll (sprint_step). The row off (the default): its key and button do nothing */
const int sprint_held = rx_option(HOS_OPT_SPRINT, 0) ? sprint_now : 0;
Member

Publish Sprint enable and its binding layout together. A bridge update can race this read and expose a partial Shift/L3 remap.

Publish Sprint enable and its binding layout together. A bridge update can race this read and expose a partial Shift/L3 remap.
@ -30,0 +35,4 @@
if configured:
if os.path.isfile(configured) or shutil.which(configured):
return [configured]
return [part.strip('"') for part in shlex.split(configured, posix=sys.platform != "win32")]
Member

Windows shlex splits an argument like -I"C:\Program Files\SDK" inside the path. Use Windows-compatible parsing for configured compiler commands with flags.

Windows shlex splits an argument like -I"C:\Program Files\SDK" inside the path. Use Windows-compatible parsing for configured compiler commands with flags.
fix(input): Sprint on for the input only with its layout whole; CC and CXX taken whole; the row's help as suggested
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
PR description / Description follows the template (pull_request_target) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 15s
Third-party parts / As their notes say (pull_request) Successful in 17s
CI / Website build and checks (pull_request) Has been cancelled
bfa4c5bd17
From BeanBot's review of d1ad0851:
- The input read the Sprint row's value (opts.sprint, through the renderer) apart from the bindings the row moves, so a
  change from the menu or the bridge could be seen half done. The row's layout now publishes Sprint on to the host
  (HOS_BIND_SPRINT_ON, MKWVK_API_VERSION 38): off before any binding moves, on only once the layout is whole, through
  an atomic exchange (a full barrier). npad_states reads it with acquire, and the row's value, before read_input samples
  the bindings: on means the layout is whole; either off turns Sprint off at once. At the first use the host takes it
  from the options file's sprint= line, as it does the bindings. tests/test_sprint.py: every binding the layout moves
  is checked to move while Sprint is off for the input, and Sprint on after the layout (fails before: never published).
- tests/test_sprint.py takes CC and CXX as one program each, as the other checks do (tests/test_audio_volume.py): no
  splitting, so a Windows path with spaces stays whole.
- The row's help: "Hold Shift, or click and hold the left stick, while moving".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Pushed bfa4c5bd, on BeanBot's review of d1ad0851 (#1948 (comment)):

  • Sprint on and its layout together (host/nn_hid.c:1401): the row's layout now publishes Sprint on to the host (HOS_BIND_SPRINT_ON, MKWVK_API_VERSION 38): off before any binding moves, on only once the layout is whole, through an atomic exchange. npad_states reads it with acquire, and the row's value, before read_input samples the bindings, so on means the layout is whole and either off turns Sprint off at once. At the first use the host takes it from the options file's sprint= line. tests/test_sprint.py checks that no binding the layout moves moves while Sprint is on for the input, and that it is on after the layout (fails on d1ad0851).
  • CC and CXX (tests/test_sprint.py:38): taken as one program each, as the other checks take them (tests/test_audio_volume.py, tests/test_discord_activity.py): no splitting, so a Windows path with spaces stays whole.
  • The row's help: "Hold Shift, or click and hold the left stick, while moving", as suggested.
  • BeanBot's d1ad0851 checked: its handoff test fails on 3bc1dbfb (the tap lost) and passes on it.
  • The Graphics screenshot's source review: it fails the same way on main @ fc4a6769 and here (37 issues each, vk_menu.cpp and vk_api.h among them already on main); the image is the Graphics tab, which this PR doesn't change.
  • Maintainers, for the record: tests/test_sprint.py on main (from #1929, and #196 before it) has a LIFTED fixture in the lifter's C format with the game's function names, as nx2/oot_patches.py's anchors are; this PR replaces it with independently written matcher input.

Not run in the game: main @ fc4a6769 doesn't build on Windows (the vk_replay.cpp namespace break, already reported), so this head is checked game-free only (test_sprint, test_input_background, test_pads_after_menu, test_walk_key, the menu checks). The earlier hold run (5.30-5.32 m/s held, 3.45-3.67 after letting go) was on 3bc1dbfb's code, v3.0.0-131-g9229f098, which includes #1929.

Pushed bfa4c5bd, on BeanBot's review of d1ad0851 (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1948#issuecomment-61794): - **Sprint on and its layout together** (host/nn_hid.c:1401): the row's layout now publishes Sprint on to the host (`HOS_BIND_SPRINT_ON`, `MKWVK_API_VERSION` 38): off before any binding moves, on only once the layout is whole, through an atomic exchange. `npad_states` reads it with acquire, and the row's value, before `read_input` samples the bindings, so on means the layout is whole and either off turns Sprint off at once. At the first use the host takes it from the options file's `sprint=` line. `tests/test_sprint.py` checks that no binding the layout moves moves while Sprint is on for the input, and that it is on after the layout (fails on d1ad0851). - **CC and CXX** (tests/test_sprint.py:38): taken as one program each, as the other checks take them (`tests/test_audio_volume.py`, `tests/test_discord_activity.py`): no splitting, so a Windows path with spaces stays whole. - **The row's help**: "Hold Shift, or click and hold the left stick, while moving", as suggested. - **BeanBot's d1ad0851 checked**: its handoff test fails on 3bc1dbfb (the tap lost) and passes on it. - **The Graphics screenshot's source review**: it fails the same way on `main` @ fc4a6769 and here (37 issues each, `vk_menu.cpp` and `vk_api.h` among them already on `main`); the image is the Graphics tab, which this PR doesn't change. - **Maintainers, for the record:** `tests/test_sprint.py` on `main` (from #1929, and #196 before it) has a `LIFTED` fixture in the lifter's C format with the game's function names, as `nx2/oot_patches.py`'s anchors are; this PR replaces it with independently written matcher input. Not run in the game: `main` @ fc4a6769 doesn't build on Windows (the `vk_replay.cpp` namespace break, already reported), so this head is checked game-free only (`test_sprint`, `test_input_background`, `test_pads_after_menu`, `test_walk_key`, the menu checks). The earlier hold run (5.30-5.32 m/s held, 3.45-3.67 after letting go) was on 3bc1dbfb's code, `v3.0.0-131-g9229f098`, which includes #1929.
Author
Member
@fix
Author
Member
@fix
Member

I changed this pull request where the review's points could be done here (the rest needs runs, measurements or decisions): the new head is 8e51501b1b. I rebased it onto main (ae8e78b091).

Changed

  • Compiler argument parsing, tests/test_sprint.py:33: Added Windows-compatible quote and backslash parsing for compiler commands with flags, preserved bare executable paths, and added parser cases. Tests were not run.
  • Sprint input snapshot, host/nn_hid.c:762: Locked binding updates and input reads together, and grouped Sprint layout changes into one update. Updated the Sprint source checks; no tests or builds were run.

Changed in part (the rest is for the author)

  • Sprint input synchronization, host/nn_hid.c:1371: Input now loads the saved value before sampling the host's atomic Sprint flag and no longer reads the renderer's unsynchronized option. The author must still publish the enable value and binding layout together and make each input read use one synchronized snapshot; bindings can still change during a sample.
  • Sprint verification, docs/dev/reference/control-bridge.md:132: Added a checklist for recording the bridge revision, physical-device comparisons, screenshots and checks. The author must identify the revision used for the bridge run; compare the base and updated head with an Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck; exercise release while steering, the A handoff, and Sprint Off and On; provide before-and-after menu screenshots; and report the Linux build, applicable Tier 1 coverage, lint, CI and baseline-equivalent suite failures. Nothing was run here.

Left for the author

  • Graphics guide screenshot review: The author must compare docs/user/images/guide/settings-graphics.png with the current UI, record the comparison and reviewed hashes in the manifest, and recapture if the view differs. The guide's screenshot maintenance instructions were inspected; no visual comparison or hashes were recorded.
  • Existing sampled fixture: The author must notify a maintainer about the sampled fixture already on main and ask how to handle it. Sending that notification was not authorized.

Nothing was built or run: check the change. It will be reviewed again.


Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

I changed this pull request where the review's points could be done here (the rest needs runs, measurements or decisions): the new head is 8e51501b1b50. I rebased it onto `main` (ae8e78b0910d). **Changed** - **Compiler argument parsing, tests/test_sprint.py:33**: Added Windows-compatible quote and backslash parsing for compiler commands with flags, preserved bare executable paths, and added parser cases. Tests were not run. - **Sprint input snapshot, host/nn_hid.c:762**: Locked binding updates and input reads together, and grouped Sprint layout changes into one update. Updated the Sprint source checks; no tests or builds were run. **Changed in part (the rest is for the author)** - **Sprint input synchronization, host/nn_hid.c:1371**: Input now loads the saved value before sampling the host's atomic Sprint flag and no longer reads the renderer's unsynchronized option. The author must still publish the enable value and binding layout together and make each input read use one synchronized snapshot; bindings can still change during a sample. - **Sprint verification, docs/dev/reference/control-bridge.md:132**: Added a checklist for recording the bridge revision, physical-device comparisons, screenshots and checks. The author must identify the revision used for the bridge run; compare the base and updated head with an Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck; exercise release while steering, the A handoff, and Sprint Off and On; provide before-and-after menu screenshots; and report the Linux build, applicable Tier 1 coverage, lint, CI and baseline-equivalent suite failures. Nothing was run here. **Left for the author** - **Graphics guide screenshot review**: The author must compare docs/user/images/guide/settings-graphics.png with the current UI, record the comparison and reviewed hashes in the manifest, and recapture if the view differs. The guide's screenshot maintenance instructions were inspected; no visual comparison or hashes were recorded. - **Existing sampled fixture**: The author must notify a maintainer about the sampled fixture already on main and ask how to handle it. Sending that notification was not authorized. Nothing was built or run: check the change. It will be reviewed again. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed feat/sprint-hold-l3 from bfa4c5bd17
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
PR description / Description follows the template (pull_request_target) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 15s
Third-party parts / As their notes say (pull_request) Successful in 17s
CI / Website build and checks (pull_request) Has been cancelled
to 8e51501b1b
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 15s
CI / Conventional Commit title (pull_request) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 17s
CI / Workflow lint (actionlint) (pull_request) Successful in 19s
Third-party parts / As their notes say (pull_request) Successful in 22s
CI / Website build and checks (pull_request) Has been cancelled
2026-11-21 01:37:21 +00:00
Compare
llun force-pushed feat/sprint-hold-l3 from 8e51501b1b
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 15s
CI / Conventional Commit title (pull_request) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 17s
CI / Workflow lint (actionlint) (pull_request) Successful in 19s
Third-party parts / As their notes say (pull_request) Successful in 22s
CI / Website build and checks (pull_request) Has been cancelled
to 98ea4101c3
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 23s
PR description / Description follows the template (pull_request_target) Successful in 28s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 32s
CI / Workflow lint (actionlint) (pull_request) Successful in 34s
Third-party parts / As their notes say (pull_request) Successful in 35s
CI / Website build and checks (pull_request) Has been cancelled
2026-11-21 01:40:23 +00:00
Compare
BeanBot left a comment

Recommendation: Request changes. Hold-to-sprint gives players direct control over when the fast run ends, but the new input lock can deadlock the game even with Sprint Off. The same change also breaks input test fixtures, and physical L3 behavior remains unverified on this head.

Sprint moves below Walk speed on Controls and keeps its saved key. Players who used the toggle now keep L3 clicked while steering. The patch removes the latch, adds coverage for releasing Sprint and tapping A together, and adds a host-side binding transaction that needs a narrower lock scope.

Since the last review (on d1ad085193)
Resolved:

  • HEAD uses a synthetic fixture, but the sampled fixture is already on main and the fix report confirms no maintainer was notified. Notify a maintainer so they can decide how to handle the existing material. (HEAD uses synthetic matcher input. The author’s bfa4c5bd follow-up explicitly flagged the existing main-branch fixture to maintainers in the PR.)
  • tests/test_sprint.py:38: The Windows compiler parser splits a valid setting such as CC=clang -I"C:\Program Files\SDK" inside the include path. That can fail the fixture build even when clang is available. Use Windows-compatible argument parsing for compiler commands that include flags, while retaini (tests/test_sprint.py uses Windows quote and backslash parsing for compiler commands with flags, keeps an existing bare executable path whole, and covers the original embedded-quote include-path case.)
    Still open:
  • host/nn_hid.c:1397: While the bridge enables Sprint, input can read the plain opts.sprint value concurrently with the write and sample the old or partly moved Shift and L3 bindings. Publish the enable value and binding layout together after a load or setting change, and have input use one synchroniz (Live changes publish the flag and binding moves under one lock, and polling no longer reads opts.sprint. Startup still interprets sprint= differently in the host and renderer, so the displayed and effective values can disagree.)
  • gpu/vk/vk_menu.cpp:2548: The Graphics guide screenshot tracks vk_menu.cpp and vk_api.h, and its reviewed hashes are stale. The source check will flag the edited inputs even if the visible Graphics view still matches. Compare the published image with the current UI, record the comparison and reviewed (The author reported 37 source-check issues on both the old base and the branch and identified the image as the Graphics tab. The current manifest still lacks a visual comparison and review record for the changed inputs.)
  • Identify the revision used for the bridge run. Compare the base and updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Exercise release while steering, the A handoff and Sprint Off and On, and include before-and-after menu screenshots. Repor (The author identified the older bridge build. Physical Windows and Linux coverage, menu captures, the Linux build, and current-head check results remain pending.)
    New:
  • host/nn_hid.c:1210: read_input holds input_bind_lock while mouse_sens_keys can take menu_mu through rx_option_set(7). A concurrent bridge Sprint change holds menu_mu and waits for input_bind_lock in hos_bind. For example, pressing + to change mouse sensitivity as the bridge toggles Sprint can freeze both threads. Copy the enable flag and binding tables under a short shared lock, release it, and sample input from that snapshot without holding the lock across menu callbacks or device work.
  • tests/test_input_background.py:90: The fixture supplies sprint_on but extracts read_input and npad_states without declaring input_bind_lock or sprint_frame. Its generated C fails to compile even for ordinary background input. Include the new state and lock support in the fixture while keeping the existing behavior assertions.
  • host/nn_hid.c:762: Moving the public hos_bind below bind_one breaks the source cutters that used it as the next function boundary. test_sprint.py, test_bound_keys.py, and test_walk_key.py can append a helper without its declaration, while test_pad_layout.py now appends a second hos_bind definition. Update the consumers to extract both complete definitions exactly once and supply any new state used by their extracted input path.

Does it help: Unproven on physical L3. The author’s Windows 11 and RTX 5080 run in Hyrule Field used v3.0.0-131-g9229f098 with the earlier patch and reported 5.30–5.32 m/s held and 3.45–3.67 m/s after release. The bridge injects the keyboard-equivalent Sprint bit, which already used hold behavior on the base. The current head has no physical-device comparison or input timing evidence for the new lock.
Other systems: SDL, XInput, keyboard and mouse, background input, and bridge input share the changed input path. The new lock affects Windows and Linux, including Steam Deck, with Sprint Off as well as On. The menu binding callbacks use API version 39, which requires a matching host and renderer in the shipped runtime. The diff leaves GPU replay, audio, save data, and game build steps untouched.
Switches: No environment switches changed. The existing sprint= option stays Off by default and keeps its saved key. Off preserves the default binding layout for new profiles. The host and menu must agree on how they interpret the saved value.

Reviewed: 8e51501b1b against ae8e78b091: Read AGENTS.md, CONTRIBUTING.md, developer standards, and the Forgejo template. No separate review checklist or sibling Tooling checkout was present. Read all nine file diffs and four commits at 8e51501b1b against ae8e78b091 and compared the re-review changes against the rebased earlier commits. Read sprint.cpp, test_sprint.py, and test_input_background.py in full and traced the changed host, menu, API, bridge, and fixture paths. Read the screenshot maintenance rules and skimmed the manifest, translation references, recorded runs, and related fixtures. Unrelated sections of the larger host, renderer, and guide files were outside the review.; nothing run (a code review).
Checked and fine:

  • The Sprint row uses the Controls anchor, follows Walk speed, keeps sprint=, and remains preset-exempt. The player and developer docs place it on Controls.
  • The A handoff uses whether the previous sample supplied A. The extracted step fixture covers release while steering, a simultaneous A tap, and a second tap during the owed interval.
  • The renderer API version increases for the new binding commands. The diff leaves third-party and generated files untouched, removes the sampled fixture, and retains AI assistance attribution.

Blocking (to change before merge)

  1. host/nn_hid.c:614: At startup the renderer clamps the saved toggle to 0 or 1, while the host enables Sprint only for exactly 1. An existing INI with sprint=2 and a Sprint binding shows On and worked on the base, but the host now ignores that binding until the row is toggled. Use the same saved-value parsing for the flag sampled with the bindings and for the displayed row.
  2. host/nn_hid.c:1210: read_input holds input_bind_lock while mouse_sens_keys can take menu_mu through rx_option_set(7). A concurrent bridge Sprint change holds menu_mu and waits for input_bind_lock in hos_bind. For example, pressing + to change mouse sensitivity as the bridge toggles Sprint can freeze both threads. Copy the enable flag and binding tables under a short shared lock, release it, and sample input from that snapshot without holding the lock across menu callbacks or device work.
  3. tests/test_input_background.py:90: The fixture supplies sprint_on but extracts read_input and npad_states without declaring input_bind_lock or sprint_frame. Its generated C fails to compile even for ordinary background input. Include the new state and lock support in the fixture while keeping the existing behavior assertions.
  4. host/nn_hid.c:762: Moving the public hos_bind below bind_one breaks the source cutters that used it as the next function boundary. test_sprint.py, test_bound_keys.py, and test_walk_key.py can append a helper without its declaration, while test_pad_layout.py now appends a second hos_bind definition. Update the consumers to extract both complete definitions exactly once and supply any new state used by their extracted input path.

Waiting on the author (a run, a measurement or a decision; no edit does it)

  • gpu/vk/vk_menu.cpp:2548: The published Graphics image still has stale reviewed hashes for vk_menu.cpp and vk_api.h. The source check can flag an old image even when the same files already failed on the base. Compare the published image with the current Graphics view, record the reviewed hashes and comparison in the manifest, and recapture if they differ.
  • The identified older bridge run bypasses physical L3 and predates the current lock. Compare ae8e78b091 and the updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover release while steering, the A handoff, Sprint Off and On, and before-and-after menu screenshots. Report the Linux build, applicable Tier 1 coverage, lint, CI, and named baseline-equivalent suite failures for the updated head.

Suggestions (the author may take or leave)

  • Put the PR-specific verification checklist in the PR’s Testing section. The bridge reference can keep the lasting distinction between scripted Sprint and physical L3.

Testing: Read-only review. git diff --check was clean. No builds or tests were run. The author reported older Windows game-free checks and a suite comparison of 712 passed, 64 failed, and 128 skipped. The rebased base includes #1949’s fix for the reported Windows compile break, so fresh results should use that base. After shortening the lock scope, compare input timing with Sprint Off and On as well as exercising the physical inputs.
Overlaps and merge order: #1929 is already in the base and provides the Sprint behavior this PR changes. #1949 is also in the base and fixes the previously reported Windows build break.


Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** Hold-to-sprint gives players direct control over when the fast run ends, but the new input lock can deadlock the game even with Sprint Off. The same change also breaks input test fixtures, and physical L3 behavior remains unverified on this head. Sprint moves below Walk speed on Controls and keeps its saved key. Players who used the toggle now keep L3 clicked while steering. The patch removes the latch, adds coverage for releasing Sprint and tapping A together, and adds a host-side binding transaction that needs a narrower lock scope. **Since the last review** (on d1ad085193da) Resolved: - HEAD uses a synthetic fixture, but the sampled fixture is already on main and the fix report confirms no maintainer was notified. Notify a maintainer so they can decide how to handle the existing material. (HEAD uses synthetic matcher input. The author’s bfa4c5bd follow-up explicitly flagged the existing main-branch fixture to maintainers in the PR.) - tests/test_sprint.py:38: The Windows compiler parser splits a valid setting such as CC=clang -I"C:\Program Files\SDK" inside the include path. That can fail the fixture build even when clang is available. Use Windows-compatible argument parsing for compiler commands that include flags, while retaini (tests/test_sprint.py uses Windows quote and backslash parsing for compiler commands with flags, keeps an existing bare executable path whole, and covers the original embedded-quote include-path case.) Still open: - host/nn_hid.c:1397: While the bridge enables Sprint, input can read the plain opts.sprint value concurrently with the write and sample the old or partly moved Shift and L3 bindings. Publish the enable value and binding layout together after a load or setting change, and have input use one synchroniz (Live changes publish the flag and binding moves under one lock, and polling no longer reads opts.sprint. Startup still interprets sprint= differently in the host and renderer, so the displayed and effective values can disagree.) - gpu/vk/vk_menu.cpp:2548: The Graphics guide screenshot tracks vk_menu.cpp and vk_api.h, and its reviewed hashes are stale. The source check will flag the edited inputs even if the visible Graphics view still matches. Compare the published image with the current UI, record the comparison and reviewed (The author reported 37 source-check issues on both the old base and the branch and identified the image as the Graphics tab. The current manifest still lacks a visual comparison and review record for the changed inputs.) - Identify the revision used for the bridge run. Compare the base and updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Exercise release while steering, the A handoff and Sprint Off and On, and include before-and-after menu screenshots. Repor (The author identified the older bridge build. Physical Windows and Linux coverage, menu captures, the Linux build, and current-head check results remain pending.) New: - host/nn_hid.c:1210: read_input holds input_bind_lock while mouse_sens_keys can take menu_mu through rx_option_set(7). A concurrent bridge Sprint change holds menu_mu and waits for input_bind_lock in hos_bind. For example, pressing + to change mouse sensitivity as the bridge toggles Sprint can freeze both threads. Copy the enable flag and binding tables under a short shared lock, release it, and sample input from that snapshot without holding the lock across menu callbacks or device work. - tests/test_input_background.py:90: The fixture supplies sprint_on but extracts read_input and npad_states without declaring input_bind_lock or sprint_frame. Its generated C fails to compile even for ordinary background input. Include the new state and lock support in the fixture while keeping the existing behavior assertions. - host/nn_hid.c:762: Moving the public hos_bind below bind_one breaks the source cutters that used it as the next function boundary. test_sprint.py, test_bound_keys.py, and test_walk_key.py can append a helper without its declaration, while test_pad_layout.py now appends a second hos_bind definition. Update the consumers to extract both complete definitions exactly once and supply any new state used by their extracted input path. **Does it help:** Unproven on physical L3. The author’s Windows 11 and RTX 5080 run in Hyrule Field used v3.0.0-131-g9229f098 with the earlier patch and reported 5.30–5.32 m/s held and 3.45–3.67 m/s after release. The bridge injects the keyboard-equivalent Sprint bit, which already used hold behavior on the base. The current head has no physical-device comparison or input timing evidence for the new lock. **Other systems:** SDL, XInput, keyboard and mouse, background input, and bridge input share the changed input path. The new lock affects Windows and Linux, including Steam Deck, with Sprint Off as well as On. The menu binding callbacks use API version 39, which requires a matching host and renderer in the shipped runtime. The diff leaves GPU replay, audio, save data, and game build steps untouched. **Switches:** No environment switches changed. The existing sprint= option stays Off by default and keeps its saved key. Off preserves the default binding layout for new profiles. The host and menu must agree on how they interpret the saved value. **Reviewed:** 8e51501b1b50 against ae8e78b0910d: Read AGENTS.md, CONTRIBUTING.md, developer standards, and the Forgejo template. No separate review checklist or sibling Tooling checkout was present. Read all nine file diffs and four commits at 8e51501b1b50 against ae8e78b0910d and compared the re-review changes against the rebased earlier commits. Read sprint.cpp, test_sprint.py, and test_input_background.py in full and traced the changed host, menu, API, bridge, and fixture paths. Read the screenshot maintenance rules and skimmed the manifest, translation references, recorded runs, and related fixtures. Unrelated sections of the larger host, renderer, and guide files were outside the review.; nothing run (a code review). **Checked and fine:** - The Sprint row uses the Controls anchor, follows Walk speed, keeps sprint=, and remains preset-exempt. The player and developer docs place it on Controls. - The A handoff uses whether the previous sample supplied A. The extracted step fixture covers release while steering, a simultaneous A tap, and a second tap during the owed interval. - The renderer API version increases for the new binding commands. The diff leaves third-party and generated files untouched, removes the sampled fixture, and retains AI assistance attribution. **Blocking** (to change before merge) 1. host/nn_hid.c:614: At startup the renderer clamps the saved toggle to 0 or 1, while the host enables Sprint only for exactly 1. An existing INI with sprint=2 and a Sprint binding shows On and worked on the base, but the host now ignores that binding until the row is toggled. Use the same saved-value parsing for the flag sampled with the bindings and for the displayed row. 2. host/nn_hid.c:1210: read_input holds input_bind_lock while mouse_sens_keys can take menu_mu through rx_option_set(7). A concurrent bridge Sprint change holds menu_mu and waits for input_bind_lock in hos_bind. For example, pressing + to change mouse sensitivity as the bridge toggles Sprint can freeze both threads. Copy the enable flag and binding tables under a short shared lock, release it, and sample input from that snapshot without holding the lock across menu callbacks or device work. 3. tests/test_input_background.py:90: The fixture supplies sprint_on but extracts read_input and npad_states without declaring input_bind_lock or sprint_frame. Its generated C fails to compile even for ordinary background input. Include the new state and lock support in the fixture while keeping the existing behavior assertions. 4. host/nn_hid.c:762: Moving the public hos_bind below bind_one breaks the source cutters that used it as the next function boundary. test_sprint.py, test_bound_keys.py, and test_walk_key.py can append a helper without its declaration, while test_pad_layout.py now appends a second hos_bind definition. Update the consumers to extract both complete definitions exactly once and supply any new state used by their extracted input path. **Waiting on the author** (a run, a measurement or a decision; no edit does it) - gpu/vk/vk_menu.cpp:2548: The published Graphics image still has stale reviewed hashes for vk_menu.cpp and vk_api.h. The source check can flag an old image even when the same files already failed on the base. Compare the published image with the current Graphics view, record the reviewed hashes and comparison in the manifest, and recapture if they differ. - The identified older bridge run bypasses physical L3 and predates the current lock. Compare ae8e78b0910d and the updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover release while steering, the A handoff, Sprint Off and On, and before-and-after menu screenshots. Report the Linux build, applicable Tier 1 coverage, lint, CI, and named baseline-equivalent suite failures for the updated head. **Suggestions** (the author may take or leave) - Put the PR-specific verification checklist in the PR’s Testing section. The bridge reference can keep the lasting distinction between scripted Sprint and physical L3. **Testing:** Read-only review. git diff --check was clean. No builds or tests were run. The author reported older Windows game-free checks and a suite comparison of 712 passed, 64 failed, and 128 skipped. The rebased base includes #1949’s fix for the reported Windows compile break, so fresh results should use that base. After shortening the lock scope, compare input timing with Sprint Off and On as well as exercising the physical inputs. **Overlaps and merge order:** #1929 is already in the base and provides the Sprint behavior this PR changes. #1949 is also in the base and fixes the previously reported Windows build break. --- <sub>Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
host/nn_hid.c Outdated
@ -606,6 +611,7 @@ static void binds_load(void) {
if (!eq) continue;
*eq = 0;
if (!strcmp(line, "options_version")) version = atoi(eq + 1);
if (!strcmp(line, "sprint")) InterlockedExchange(&sprint_on, atoi(eq + 1) == 1);
Member

With sprint=2 the menu clamps to On but the host stays Off and ignores the saved binding. Share one saved-value interpretation.

With sprint=2 the menu clamps to On but the host stays Off and ignores the saved binding. Share one saved-value interpretation.
host/nn_hid.c Outdated
@ -748,6 +759,23 @@ void hos_bind(int set, int button, int slot, int code) {
hos_input_clear_toggles();
}
void hos_bind(int set, int button, int slot, int code) {
Member

The new function boundary breaks the Sprint, bound-keys, Walk, and pad-layout source cutters. Extract both binding functions in full and exactly once.

The new function boundary breaks the Sprint, bound-keys, Walk, and pad-layout source cutters. Extract both binding functions in full and exactly once.
host/nn_hid.c Outdated
@ -1189,2 +1208,3 @@
void hos_mouse_native_stick(int held);
scripted_input(buttons, taps, stick);
binds_load();
AcquireSRWLockShared(&input_bind_lock);
Member

Mouse sensitivity takes menu_mu from inside this lock. A bridge Sprint change takes the locks in reverse order and can freeze the game. Sample from a short locked copy.

Mouse sensitivity takes menu_mu from inside this lock. A bridge Sprint change takes the locks in reverse order and can freeze the game. Sample from a short locked copy.
@ -87,2 +87,4 @@
cheat_state += "\n" + block(hid, "enum { SPRINT_KEY") + ";\n" # (Sprint; its gamepad input leaves the HUD shortcut's out)
cheat_state += "static uint64_t hud_pad_mask(void);\n" + block(hid, "static int pad_sprint_down(")
# (Sprint on for the input, as the row's layout publishes it: the fixture's rx_option says the row is on)
cheat_state += "\nstatic volatile LONG sprint_on = 1;\n"
Member

The extracted functions also need input_bind_lock and sprint_frame. Both are missing from the generated fixture.

The extracted functions also need input_bind_lock and sprint_frame. Both are missing from the generated fixture.
Author
Member
@fix
Member

I changed this pull request where the review's points could be done here (the rest needs runs, measurements or decisions): the new head is ca7099c88e. It was already up to date with main.

Changed

  • Saved Sprint value: Matched the renderer’s 0–1 clamp in host/nn_hid.c:618 and added positive and negative saved-value cases in tests/test_sprint.py:232.
  • Input binding lock: host/nn_hid.c:1218 snapshots Sprint and both binding tables before releasing the lock; input helpers use the snapshot and cached pad input is remapped against it. Added snapshot coverage in tests/test_bound_keys.py:225.
  • Background input fixture: Added the lock and snapshot state in tests/input_background_test.c:53 and corrected the background branch boundary in tests/test_input_background.py:56.
  • Binding source cutters: Updated the cutters in tests/test_sprint.py:317, tests/test_bound_keys.py:245, tests/test_walk_key.py:345, and tests/test_pad_layout.py:168 to extract complete definitions once. Updated affected input fixtures for snapshot access. No tests or builds were run.

Changed in part (the rest is for the author)

  • Graphics image review: Added comparison and manifest handoff steps in docs/user/images/guide/README.md:141. The author must capture the updated Graphics view, compare it with the published image, record the reviewed hashes and comparison, and recapture the published image if they differ.
  • Physical input and validation: Recorded the device and reporting checklist in tests/test_sprint.py:17. The author must compare ae8e78b091 and the updated head with an Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck, cover the requested Sprint and A handoff cases and screenshots, and report the Linux build, applicable Tier 1 coverage, lint, CI, and named baseline-equivalent suite failures.

Nothing was built or run: check the change. It will be reviewed again.


Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

I changed this pull request where the review's points could be done here (the rest needs runs, measurements or decisions): the new head is ca7099c88e21. It was already up to date with `main`. **Changed** - **Saved Sprint value**: Matched the renderer’s 0–1 clamp in host/nn_hid.c:618 and added positive and negative saved-value cases in tests/test_sprint.py:232. - **Input binding lock**: host/nn_hid.c:1218 snapshots Sprint and both binding tables before releasing the lock; input helpers use the snapshot and cached pad input is remapped against it. Added snapshot coverage in tests/test_bound_keys.py:225. - **Background input fixture**: Added the lock and snapshot state in tests/input_background_test.c:53 and corrected the background branch boundary in tests/test_input_background.py:56. - **Binding source cutters**: Updated the cutters in tests/test_sprint.py:317, tests/test_bound_keys.py:245, tests/test_walk_key.py:345, and tests/test_pad_layout.py:168 to extract complete definitions once. Updated affected input fixtures for snapshot access. No tests or builds were run. **Changed in part (the rest is for the author)** - **Graphics image review**: Added comparison and manifest handoff steps in docs/user/images/guide/README.md:141. The author must capture the updated Graphics view, compare it with the published image, record the reviewed hashes and comparison, and recapture the published image if they differ. - **Physical input and validation**: Recorded the device and reporting checklist in tests/test_sprint.py:17. The author must compare ae8e78b0910d and the updated head with an Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck, cover the requested Sprint and A handoff cases and screenshots, and report the Linux build, applicable Tier 1 coverage, lint, CI, and named baseline-equivalent suite failures. Nothing was built or run: check the change. It will be reviewed again. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
fix(input): snapshot sprint bindings during input reads
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 22s
CI / Conventional Commit title (pull_request) Successful in 22s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 32s
CI / Workflow lint (actionlint) (pull_request) Successful in 35s
Third-party parts / As their notes say (pull_request) Successful in 39s
CI / Website build and checks (pull_request) Has been cancelled
ca7099c88e
As the review on #1948 asked.
BeanBot left a comment

Recommendation: Request changes. The binding snapshot removes the input/menu lock inversion, but a concurrent rebind can still mix two layouts in one ocarina input report. Physical L3 behavior on the updated head also needs verification.

Players with Sprint enabled hold L3 while steering and find Sprint below Walk speed on the Controls tab. The saved setting and custom bindings carry over. Removing the latch simplifies Sprint itself, while publishing and sampling the binding layout together adds synchronization to shared input code.

Since the last review (on 8e51501b1b)
Resolved:

  • host/nn_hid.c:614: At startup the renderer clamps the saved toggle to 0 or 1, while the host enables Sprint only for exactly 1. An existing INI with sprint=2 and a Sprint binding shows On and worked on the base, but the host now ignores that binding until the row is toggled. Use the same saved-value (host/nn_hid.c:618 treats positive saved values as On, matching the renderer's 0–1 clamp. The Sprint fixture covers sprint=2 and sprint=-1.)
  • host/nn_hid.c:1210: read_input holds input_bind_lock while mouse_sens_keys can take menu_mu through rx_option_set(7). A concurrent bridge Sprint change holds menu_mu and waits for input_bind_lock in hos_bind. For example, pressing + to change mouse sensitivity as the bridge toggles Sprint can freeze (host/nn_hid.c:1219–1224 copies Sprint and both binding tables under the shared lock and releases it before callbacks or device work. The ocarina serialization issue is listed separately.)
  • tests/test_input_background.py:90: The fixture supplies sprint_on but extracts read_input and npad_states without declaring input_bind_lock or sprint_frame. Its generated C fails to compile even for ordinary background input. Include the new state and lock support in the fixture while keeping the ex (The background fixture supplies the lock, Sprint frame and snapshot helpers, and its source check now ends at goto done. The routing assertions remain in place.)
  • host/nn_hid.c:762: Moving the public hos_bind below bind_one breaks the source cutters that used it as the next function boundary. test_sprint.py, test_bound_keys.py, and test_walk_key.py can append a helper without its declaration, while test_pad_layout.py now appends a second hos_bind definition. (The Sprint, bound-key and Walk cutters include the complete public definition after bind_one. The pad-layout cutter stops before it and appends it once.)
    Still open:
  • gpu/vk/vk_menu.cpp:2548: The published Graphics image still has stale reviewed hashes for vk_menu.cpp and vk_api.h. The source check can flag an old image even when the same files already failed on the base. Compare the published image with the current Graphics view, record the reviewed hashes and c (The guide README describes the comparison, but the manifest still lacks a current Graphics comparison and reviewed hashes for the changed sources.)
  • The identified older bridge run bypasses physical L3 and predates the current lock. Compare ae8e78b091 and the updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover release while steering, the A handoff, Sprint Off and On, and before-an (The older bridge revision is identified. The new fixture note records the requested checks, and no physical-device, screenshot, Linux build or current-head CI results were supplied.)
    New:
  • host/nn_hid.c:1168: oc_pad_word checks sampled bindings after read_input has cleared input_snapshot_active, so it falls back to the live tables. If a rebind adds an ocarina A mapping after sampling an ordinary A press during a note wait, serialization can clear that press using the new mapping while the sampled note bits still reflect the old one. Pass the note-slot mask from the same snapshot through to serialization, or keep that snapshot in scope until the report is complete.

Does it help: Unproven for physical L3. The older Windows 11 run on an RTX 5080 measured 5.30–5.32 m/s with bridge Sprint held and 3.45–3.67 m/s after release. That run used v3.0.0-131-g9229f098 and injected the keyboard-equivalent input, which already used hold behavior on the base. No physical comparison or input timing results were supplied for ca7099c88e.
Other systems: Windows and Linux, including Steam Deck, share the binding snapshot. SDL and XInput still feed the same pad path, and cached raw pad input is now mapped against the current sample's layout. Ocarina serialization can still consult live bindings after sampling. No GPU replay, audio, save, or build-script changes appear in the diff. The host and renderer API advances from 37 to 39 for the new binding operations.
Switches: Sprint keeps its saved sprint= key and defaults to Off, preserving the stock layout for players who leave it disabled. Enabled gamepad Sprint now requires a hold. No environment switches changed.

Reviewed: ca7099c88e against 00e0dc93a9: Read the repository rules, developer standards, Forgejo template, commit history, current diff and re-review delta. Read sprint.cpp and the changed host, renderer and fixture regions with their relevant callers and source cutters. Skimmed the screenshot manifest and reported runs. Unrelated code in the large host and renderer files and translation tables was outside this re-review. The separate review checklist and local Tooling checkout were absent.; nothing run (a code review).
Checked and fine:

  • Sprint remains a menu module with the saved sprint key and appears below Walk speed in the guide and Controls tab.
  • The A handoff fixture checks the generated button state and press mask for simultaneous release and tap, and for a second tap during the owed interval.
  • The binding protocol has an API version bump. The diff adds no generated files, game-derived output or third-party changes.

Blocking (to change before merge)

  1. host/nn_hid.c:1168: oc_pad_word checks sampled bindings after read_input has cleared input_snapshot_active, so it falls back to the live tables. If a rebind adds an ocarina A mapping after sampling an ordinary A press during a note wait, serialization can clear that press using the new mapping while the sampled note bits still reflect the old one. Pass the note-slot mask from the same snapshot through to serialization, or keep that snapshot in scope until the report is complete.

Waiting on the author (a run, a measurement or a decision; no edit does it)

  • gpu/vk/vk_menu.cpp:2548: The published Graphics screenshot still lacks a comparison against the current UI and reviewed hashes for vk_menu.cpp and vk_api.h. The existing baseline warnings do not establish that the published view still matches. Record the comparison and hashes in the manifest, and recapture the image if the view differs.
  • Compare the current base 00e0dc93a9 and updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover release while steering, the A handoff, Sprint Off and On, and before-and-after menu screenshots. Report the Linux build, applicable Tier 1 coverage, lint, CI and named baseline-equivalent suite failures.

Suggestions (the author may take or leave)

  • Keep the revision-specific verification checklist in the PR description so its base and results can be updated together.

Testing: Read-only review. git diff --check passed. No project code, builds or tests were run. The author reported game-free checks on an earlier head and a Windows suite result of 712 passed, 64 failed and 128 skipped with matching baseline failures. Current-head results are pending.
Overlaps and merge order: #1929 is the merged Sprint implementation this follows. Issue #1047 is related. No competing pull request was identified in the supplied material.


Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The binding snapshot removes the input/menu lock inversion, but a concurrent rebind can still mix two layouts in one ocarina input report. Physical L3 behavior on the updated head also needs verification. Players with Sprint enabled hold L3 while steering and find Sprint below Walk speed on the Controls tab. The saved setting and custom bindings carry over. Removing the latch simplifies Sprint itself, while publishing and sampling the binding layout together adds synchronization to shared input code. **Since the last review** (on 8e51501b1b50) Resolved: - host/nn_hid.c:614: At startup the renderer clamps the saved toggle to 0 or 1, while the host enables Sprint only for exactly 1. An existing INI with sprint=2 and a Sprint binding shows On and worked on the base, but the host now ignores that binding until the row is toggled. Use the same saved-value (host/nn_hid.c:618 treats positive saved values as On, matching the renderer's 0–1 clamp. The Sprint fixture covers sprint=2 and sprint=-1.) - host/nn_hid.c:1210: read_input holds input_bind_lock while mouse_sens_keys can take menu_mu through rx_option_set(7). A concurrent bridge Sprint change holds menu_mu and waits for input_bind_lock in hos_bind. For example, pressing + to change mouse sensitivity as the bridge toggles Sprint can freeze (host/nn_hid.c:1219–1224 copies Sprint and both binding tables under the shared lock and releases it before callbacks or device work. The ocarina serialization issue is listed separately.) - tests/test_input_background.py:90: The fixture supplies sprint_on but extracts read_input and npad_states without declaring input_bind_lock or sprint_frame. Its generated C fails to compile even for ordinary background input. Include the new state and lock support in the fixture while keeping the ex (The background fixture supplies the lock, Sprint frame and snapshot helpers, and its source check now ends at goto done. The routing assertions remain in place.) - host/nn_hid.c:762: Moving the public hos_bind below bind_one breaks the source cutters that used it as the next function boundary. test_sprint.py, test_bound_keys.py, and test_walk_key.py can append a helper without its declaration, while test_pad_layout.py now appends a second hos_bind definition. (The Sprint, bound-key and Walk cutters include the complete public definition after bind_one. The pad-layout cutter stops before it and appends it once.) Still open: - gpu/vk/vk_menu.cpp:2548: The published Graphics image still has stale reviewed hashes for vk_menu.cpp and vk_api.h. The source check can flag an old image even when the same files already failed on the base. Compare the published image with the current Graphics view, record the reviewed hashes and c (The guide README describes the comparison, but the manifest still lacks a current Graphics comparison and reviewed hashes for the changed sources.) - The identified older bridge run bypasses physical L3 and predates the current lock. Compare ae8e78b0910d and the updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover release while steering, the A handoff, Sprint Off and On, and before-an (The older bridge revision is identified. The new fixture note records the requested checks, and no physical-device, screenshot, Linux build or current-head CI results were supplied.) New: - host/nn_hid.c:1168: oc_pad_word checks sampled bindings after read_input has cleared input_snapshot_active, so it falls back to the live tables. If a rebind adds an ocarina A mapping after sampling an ordinary A press during a note wait, serialization can clear that press using the new mapping while the sampled note bits still reflect the old one. Pass the note-slot mask from the same snapshot through to serialization, or keep that snapshot in scope until the report is complete. **Does it help:** Unproven for physical L3. The older Windows 11 run on an RTX 5080 measured 5.30–5.32 m/s with bridge Sprint held and 3.45–3.67 m/s after release. That run used v3.0.0-131-g9229f098 and injected the keyboard-equivalent input, which already used hold behavior on the base. No physical comparison or input timing results were supplied for ca7099c88e21. **Other systems:** Windows and Linux, including Steam Deck, share the binding snapshot. SDL and XInput still feed the same pad path, and cached raw pad input is now mapped against the current sample's layout. Ocarina serialization can still consult live bindings after sampling. No GPU replay, audio, save, or build-script changes appear in the diff. The host and renderer API advances from 37 to 39 for the new binding operations. **Switches:** Sprint keeps its saved sprint= key and defaults to Off, preserving the stock layout for players who leave it disabled. Enabled gamepad Sprint now requires a hold. No environment switches changed. **Reviewed:** ca7099c88e21 against 00e0dc93a9f8: Read the repository rules, developer standards, Forgejo template, commit history, current diff and re-review delta. Read sprint.cpp and the changed host, renderer and fixture regions with their relevant callers and source cutters. Skimmed the screenshot manifest and reported runs. Unrelated code in the large host and renderer files and translation tables was outside this re-review. The separate review checklist and local Tooling checkout were absent.; nothing run (a code review). **Checked and fine:** - Sprint remains a menu module with the saved sprint key and appears below Walk speed in the guide and Controls tab. - The A handoff fixture checks the generated button state and press mask for simultaneous release and tap, and for a second tap during the owed interval. - The binding protocol has an API version bump. The diff adds no generated files, game-derived output or third-party changes. **Blocking** (to change before merge) 1. host/nn_hid.c:1168: oc_pad_word checks sampled bindings after read_input has cleared input_snapshot_active, so it falls back to the live tables. If a rebind adds an ocarina A mapping after sampling an ordinary A press during a note wait, serialization can clear that press using the new mapping while the sampled note bits still reflect the old one. Pass the note-slot mask from the same snapshot through to serialization, or keep that snapshot in scope until the report is complete. **Waiting on the author** (a run, a measurement or a decision; no edit does it) - gpu/vk/vk_menu.cpp:2548: The published Graphics screenshot still lacks a comparison against the current UI and reviewed hashes for vk_menu.cpp and vk_api.h. The existing baseline warnings do not establish that the published view still matches. Record the comparison and hashes in the manifest, and recapture the image if the view differs. - Compare the current base 00e0dc93a9f8 and updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover release while steering, the A handoff, Sprint Off and On, and before-and-after menu screenshots. Report the Linux build, applicable Tier 1 coverage, lint, CI and named baseline-equivalent suite failures. **Suggestions** (the author may take or leave) - Keep the revision-specific verification checklist in the PR description so its base and results can be updated together. **Testing:** Read-only review. git diff --check passed. No project code, builds or tests were run. The author reported game-free checks on an earlier head and a Windows suite result of 712 passed, 64 failed and 128 skipped with matching baseline failures. Current-head results are pending. **Overlaps and merge order:** #1929 is the merged Sprint implementation this follows. Issue #1047 is related. No competing pull request was identified in the supplied material. --- <sub>Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
host/nn_hid.c Outdated
@ -1138,3 +1166,3 @@
for (int i = 0; i < 5; i++) {
const int row = HOS_KEY_OC_NOTE_L + i;
if (pad_bind[row][0] < 0 && pad_bind[row][1] < 0 && !key_bind[row][0] && !key_bind[row][1])
if (sampled_pad(row, 0) < 0 && sampled_pad(row, 1) < 0 && !sampled_key(row, 0) && !sampled_key(row, 1))
Member

The snapshot is inactive by the time oc_pad_word runs. Use the same note-slot layout that produced the sampled note bits so a concurrent rebind cannot change this report.

The snapshot is inactive by the time oc_pad_word runs. Use the same note-slot layout that produced the sampled note bits so a concurrent rebind cannot change this report.
Owner
@fix
Member

I changed this pull request where the review's points could be done here (the rest needs runs, measurements or decisions): the new head is 2778447da6. I rebased it onto main (75317e1f31).

Changed

  • Preserve sampled bindings through serialization: host/nn_hid.c:1361 keeps the input snapshot active until all controller report entries are serialized, then clears it at host/nn_hid.c:1474.

Left for the author

  • Graphics screenshot source review: The source diff shows Controls help and API declaration changes, but it cannot establish that the published Graphics image matches the current rendered UI. Compare the image with a current capture, record the reviewed vk_menu.cpp and vk_api.h hashes in the manifest, and replace the image if it differs.
  • Physical-device and build validation: The steps are documented in docs/dev/reference/control-bridge.md:132. Compare base 00e0dc93a9 and the updated head using an Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck; cover release while steering, the A handoff, Sprint Off and On, and before-and-after menu screenshots. Report the Linux build, applicable Tier 1 coverage, lint, CI, and named failures also present on the baseline. No builds or tests were run here.

Nothing was built or run: check the change. It will be reviewed again.


Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I changed this pull request where the review's points could be done here (the rest needs runs, measurements or decisions): the new head is 2778447da666. I rebased it onto `main` (75317e1f31ff). **Changed** - **Preserve sampled bindings through serialization**: host/nn_hid.c:1361 keeps the input snapshot active until all controller report entries are serialized, then clears it at host/nn_hid.c:1474. **Left for the author** - **Graphics screenshot source review**: The source diff shows Controls help and API declaration changes, but it cannot establish that the published Graphics image matches the current rendered UI. Compare the image with a current capture, record the reviewed vk_menu.cpp and vk_api.h hashes in the manifest, and replace the image if it differs. - **Physical-device and build validation**: The steps are documented in docs/dev/reference/control-bridge.md:132. Compare base 00e0dc93a9f8 and the updated head using an Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck; cover release while steering, the A handoff, Sprint Off and On, and before-and-after menu screenshots. Report the Linux build, applicable Tier 1 coverage, lint, CI, and named failures also present on the baseline. No builds or tests were run here. Nothing was built or run: check the change. It will be reviewed again. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed feat/sprint-hold-l3 from ca7099c88e
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 22s
CI / Conventional Commit title (pull_request) Successful in 22s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 32s
CI / Workflow lint (actionlint) (pull_request) Successful in 35s
Third-party parts / As their notes say (pull_request) Successful in 39s
CI / Website build and checks (pull_request) Has been cancelled
to 2778447da6
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 18s
PR description / Description follows the template (pull_request_target) Failing after 7s
CI / Website build and checks (pull_request) Failing after 14s
2026-11-21 01:51:34 +00:00
Compare
BeanBot left a comment

Recommendation: Wait. The controller report now uses one binding snapshot through ocarina serialization. Merge should wait for physical-input and build validation on the updated head and for the Graphics screenshot review.

With Sprint enabled, players hold L3 while steering and release it to return to the normal run. The row moves below Walk speed on Controls and keeps its saved setting. The Sprint state machine loses its latch, while the shared input path adds a locked copy of the bindings per connected read.

Since the last review (on ca7099c88e)
Resolved:

  • host/nn_hid.c:1168: oc_pad_word checks sampled bindings after read_input has cleared input_snapshot_active, so it falls back to the live tables. If a rebind adds an ocarina A mapping after sampling an ordinary A press during a note wait, serialization can clear that press using the new mapping while (host/nn_hid.c keeps the snapshot active when read_input returns at line 1362, uses it for every oc_pad_word call at line 1470, and clears it after the report loop at line 1474.)
    Still open:
  • gpu/vk/vk_menu.cpp:2548: The published Graphics screenshot still lacks a comparison against the current UI and reviewed hashes for vk_menu.cpp and vk_api.h. The existing baseline warnings do not establish that the published view still matches. Record the comparison and hashes in the manifest, and re (The guide README describes the comparison, but the manifest still lacks a current comparison and reviewed hashes for the changed menu inputs.)
  • Compare the current base 00e0dc93a9 and updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover release while steering, the A handoff, Sprint Off and On, and before-and-after menu screenshots. Report the Linux build, applicable Tier 1 cov (The author identified the older bridge build. The physical-device comparison, menu captures, Linux build and current-head check results remain pending. The rebased comparison base is 75317e1f31.)

Does it help: Unproven for physical L3 on this head. The author's older Windows 11 bridge run on an RTX 5080 reported 5.30–5.32 m/s held and 3.45–3.67 m/s after release. It injected the keyboard-equivalent Sprint bit, which already used hold behavior on the base, and predates the binding snapshot.
Other systems: Windows XInput, SDL on Windows and Linux, and Steam Deck use the shared input path. Ocarina serialization now retains the sampled bindings across the report. The diff leaves GPU replay, audio, and saves untouched. The menu and API edits affect the Graphics guide's recorded source inputs.
Switches: No environment switches changed. Sprint keeps sprint= and defaults to Off, preserving stock controls for players who leave it disabled. Existing enabled settings now use hold-to-sprint on the gamepad. The host binding API advances from 37 to 39.

Reviewed: 2778447da6 against 75317e1f31: Read the repository rules, developer standards, Forgejo template, commit history, Sprint menu module, and changed host input code through report serialization. Inspected the other diff hunks, affected fixture excerpts, screenshot maintenance rules and manifest entry, and supplied comments and reviews. Unrelated regions of large files and the rendered screenshot were outside this review. No separate review checklist was found.; nothing run (a code review).
Checked and fine:

  • Connected reads retain the snapshot through serialization, including early input exits. Invalid guest ranges return before sampling.
  • The input binding lock is released before device polling and menu callbacks.
  • The Controls row keeps its saved key and preset exemption, and the guide reflects its new position.
  • The latest commit only changes snapshot lifetime. The diff changes no shaders, generated files, third-party code, or CI steps.

Waiting on the author (a run, a measurement or a decision; no edit does it)

  • gpu/vk/vk_menu.cpp:2548: The Graphics image tracks vk_menu.cpp and vk_api.h. The older baseline warnings leave open whether the screenshot still matches the current view. Compare a current capture, record the comparison and reviewed hashes in the manifest, and replace the image if the view differs.
  • The older bridge run cannot show what happens when a player releases physical L3 while steering on 2778447da6. Compare 75317e1f31 and this head with an Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover Sprint Off and On, release while steering, and the A handoff. Include before-and-after menu screenshots, Linux build results, applicable Tier 1 coverage, lint, CI, and named suite failures reproduced on the base.

Suggestions (the author may take or leave)

  • Carry AI assistance attribution into the squash commit for the BeanBot fixes.

Testing: Read-only review. git diff --check passed. No builds, tests, game runs, or screenshot captures were performed. The supplied game-free results are from an earlier revision.
Overlaps and merge order: #1929 supplied the original Sprint feature and is already in the base. No pending merge order was identified.


Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Wait.** The controller report now uses one binding snapshot through ocarina serialization. Merge should wait for physical-input and build validation on the updated head and for the Graphics screenshot review. With Sprint enabled, players hold L3 while steering and release it to return to the normal run. The row moves below Walk speed on Controls and keeps its saved setting. The Sprint state machine loses its latch, while the shared input path adds a locked copy of the bindings per connected read. **Since the last review** (on ca7099c88e21) Resolved: - host/nn_hid.c:1168: oc_pad_word checks sampled bindings after read_input has cleared input_snapshot_active, so it falls back to the live tables. If a rebind adds an ocarina A mapping after sampling an ordinary A press during a note wait, serialization can clear that press using the new mapping while (host/nn_hid.c keeps the snapshot active when read_input returns at line 1362, uses it for every oc_pad_word call at line 1470, and clears it after the report loop at line 1474.) Still open: - gpu/vk/vk_menu.cpp:2548: The published Graphics screenshot still lacks a comparison against the current UI and reviewed hashes for vk_menu.cpp and vk_api.h. The existing baseline warnings do not establish that the published view still matches. Record the comparison and hashes in the manifest, and re (The guide README describes the comparison, but the manifest still lacks a current comparison and reviewed hashes for the changed menu inputs.) - Compare the current base 00e0dc93a9f8 and updated head with a physical Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover release while steering, the A handoff, Sprint Off and On, and before-and-after menu screenshots. Report the Linux build, applicable Tier 1 cov (The author identified the older bridge build. The physical-device comparison, menu captures, Linux build and current-head check results remain pending. The rebased comparison base is 75317e1f31ff.) **Does it help:** Unproven for physical L3 on this head. The author's older Windows 11 bridge run on an RTX 5080 reported 5.30–5.32 m/s held and 3.45–3.67 m/s after release. It injected the keyboard-equivalent Sprint bit, which already used hold behavior on the base, and predates the binding snapshot. **Other systems:** Windows XInput, SDL on Windows and Linux, and Steam Deck use the shared input path. Ocarina serialization now retains the sampled bindings across the report. The diff leaves GPU replay, audio, and saves untouched. The menu and API edits affect the Graphics guide's recorded source inputs. **Switches:** No environment switches changed. Sprint keeps sprint= and defaults to Off, preserving stock controls for players who leave it disabled. Existing enabled settings now use hold-to-sprint on the gamepad. The host binding API advances from 37 to 39. **Reviewed:** 2778447da666 against 75317e1f31ff: Read the repository rules, developer standards, Forgejo template, commit history, Sprint menu module, and changed host input code through report serialization. Inspected the other diff hunks, affected fixture excerpts, screenshot maintenance rules and manifest entry, and supplied comments and reviews. Unrelated regions of large files and the rendered screenshot were outside this review. No separate review checklist was found.; nothing run (a code review). **Checked and fine:** - Connected reads retain the snapshot through serialization, including early input exits. Invalid guest ranges return before sampling. - The input binding lock is released before device polling and menu callbacks. - The Controls row keeps its saved key and preset exemption, and the guide reflects its new position. - The latest commit only changes snapshot lifetime. The diff changes no shaders, generated files, third-party code, or CI steps. **Waiting on the author** (a run, a measurement or a decision; no edit does it) - gpu/vk/vk_menu.cpp:2548: The Graphics image tracks vk_menu.cpp and vk_api.h. The older baseline warnings leave open whether the screenshot still matches the current view. Compare a current capture, record the comparison and reviewed hashes in the manifest, and replace the image if the view differs. - The older bridge run cannot show what happens when a player releases physical L3 while steering on 2778447da666. Compare 75317e1f31ff and this head with an Xbox controller and keyboard on Windows and a controller on Linux or Steam Deck. Cover Sprint Off and On, release while steering, and the A handoff. Include before-and-after menu screenshots, Linux build results, applicable Tier 1 coverage, lint, CI, and named suite failures reproduced on the base. **Suggestions** (the author may take or leave) - Carry AI assistance attribution into the squash commit for the BeanBot fixes. **Testing:** Read-only review. git diff --check passed. No builds, tests, game runs, or screenshot captures were performed. The supplied game-free results are from an earlier revision. **Overlaps and merge order:** #1929 supplied the original Sprint feature and is already in the base. No pending merge order was identified. --- <sub>Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
llun changed title from WIP: feat(input): Sprint on L3 only while it is held, and its row on the Controls tab to feat(input): Sprint on L3 only while it is held, and its row on the Controls tab 2026-11-21 01:54:08 +00:00
HumanBean deleted branch feat/sprint-hold-l3 2026-11-21 01:56:50 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1948
No description provided.