feat(input): Auto run, the sprint goes on after A is let go #2747
Open
github-sync
wants to merge 3 commits from
github/pr/2747 into main
pull from: github/pr/2747
merge into: MagicBeanDev:main
MagicBeanDev:main
MagicBeanDev:github/pr/2893
MagicBeanDev:github/pr/2890
MagicBeanDev:github/pr/2887
MagicBeanDev:github/pr/2878
MagicBeanDev:github/pr/2875
MagicBeanDev:github/pr/2874
MagicBeanDev:github/pr/2873
MagicBeanDev:github/pr/2871
MagicBeanDev:github/pr/2756
MagicBeanDev:github/pr/2897
MagicBeanDev:github/pr/2896
MagicBeanDev:github/pr/2718
MagicBeanDev:github/pr/2842
MagicBeanDev:github/pr/2691
MagicBeanDev:github/pr/2895
MagicBeanDev:github/pr/2743
MagicBeanDev:github/pr/2765
MagicBeanDev:github/pr/2708
MagicBeanDev:github/pr/2732
MagicBeanDev:github/pr/2755
MagicBeanDev:github/pr/2817
MagicBeanDev:github/pr/2876
MagicBeanDev:release-please--branches--main
MagicBeanDev:release-please--branches--main--release-notes
MagicBeanDev:github/pr/2778
MagicBeanDev:github/pr/2888
MagicBeanDev:github/pr/2866
MagicBeanDev:github/pr/2877
MagicBeanDev:github/pr/2800
MagicBeanDev:github/pr/2829
MagicBeanDev:github/pr/2850
MagicBeanDev:github/pr/2889
MagicBeanDev:github/pr/2882
MagicBeanDev:github/pr/2860
MagicBeanDev:github/pr/2849
MagicBeanDev:github/pr/2886
MagicBeanDev:github/pr/2794
MagicBeanDev:github/pr/2840
MagicBeanDev:github/pr/2830
MagicBeanDev:github/pr/2834
MagicBeanDev:github/pr/2719
MagicBeanDev:github/pr/2742
MagicBeanDev:github/pr/2741
MagicBeanDev:github/pr/2820
MagicBeanDev:github/pr/2771
MagicBeanDev:github/pr/2859
MagicBeanDev:github/pr/2858
MagicBeanDev:github/pr/2823
MagicBeanDev:github/pr/2757
MagicBeanDev:github/pr/2769
MagicBeanDev:github/pr/2844
MagicBeanDev:github/pr/2843
MagicBeanDev:github/pr/2673
MagicBeanDev:github/pr/2855
MagicBeanDev:github/pr/2739
MagicBeanDev:github/pr/2807
MagicBeanDev:github/pr/2851
MagicBeanDev:github/pr/2789
MagicBeanDev:github/pr/2814
MagicBeanDev:github/pr/2818
MagicBeanDev:github/pr/2774
MagicBeanDev:github/pr/2772
MagicBeanDev:github/pr/2750
MagicBeanDev:github/pr/2786
MagicBeanDev:github/pr/2785
MagicBeanDev:github/pr/2782
MagicBeanDev:github/pr/2779
MagicBeanDev:github/pr/2775
MagicBeanDev:github/pr/2706
MagicBeanDev:github/pr/2766
MagicBeanDev:github/pr/2759
MagicBeanDev:github/pr/2745
MagicBeanDev:github/pr/2740
MagicBeanDev:github/pr/2733
MagicBeanDev:github/pr/2725
MagicBeanDev:github/pr/2727
MagicBeanDev:github/pr/2728
MagicBeanDev:github/pr/2729
MagicBeanDev:github/pr/2721
MagicBeanDev:github/pr/2722
MagicBeanDev:github/pr/2715
MagicBeanDev:github/pr/2714
MagicBeanDev:github/pr/2707
MagicBeanDev:github/pr/2703
MagicBeanDev:github/pr/2705
MagicBeanDev:github/pr/2697
MagicBeanDev:github/pr/2679
MagicBeanDev:github/pr/2676
MagicBeanDev:github/pr/2669
MagicBeanDev:docs/what-hookshot-connects-to
MagicBeanDev:fix/hdr-encode-test
MagicBeanDev:fix/main-tests
MagicBeanDev:fix/play-cache-files
MagicBeanDev:perf/game-barrier-order
MagicBeanDev:feat/heap-lazy
MagicBeanDev:feat/texture-detail
MagicBeanDev:perf/astc-opaque-bc1
MagicBeanDev:fix/fs-dir-lock
MagicBeanDev:fix/framegen-native-kept
MagicBeanDev:fix/update-no-downgrade
MagicBeanDev:port/k10-gcn-f16-mirrors
MagicBeanDev:fix/framegen-mult-cap
MagicBeanDev:chore/release-as-2.1.1
MagicBeanDev:perf/pcache-load-switch
MagicBeanDev:fix/prepare-progress-log
MagicBeanDev:fix/update-closes-stale-game
MagicBeanDev:fix/hdr-scaled-sampled
MagicBeanDev:perf/first-start-preset
MagicBeanDev:perf/zero-upload
MagicBeanDev:fix/vcore-escape-2s
MagicBeanDev:test/fake-gh-atomic
MagicBeanDev:perf/batch-idle-flush
MagicBeanDev:test/finish-stub-a
MagicBeanDev:chore/record-2.1.0
MagicBeanDev:fix/main-red-tests
MagicBeanDev:fix/test-display-startup-driver-cache
MagicBeanDev:feat/mesh-shader-mode
MagicBeanDev:fix/menu-probes-at-startup
MagicBeanDev:fix/fps-counter-classic
MagicBeanDev:fix/test-log-batch-flake
MagicBeanDev:fix/narrow-screen-hud
MagicBeanDev:ci/prereleases
MagicBeanDev:release/v2.0.15
MagicBeanDev:hotfix/v2.0.15
MagicBeanDev:fix/present-ahead-replay
MagicBeanDev:release/v2.0.13
MagicBeanDev:fix/bracket-paths-2013
MagicBeanDev:fix/hdr-overlays-2013
MagicBeanDev:fix/fps-counter-scale-2013
MagicBeanDev:fix/stick-seen-at-rest
MagicBeanDev:hotfix/menu-fits-screen
MagicBeanDev:fix/f1-always-opens-menu
MagicBeanDev:fix/ini-keep-lines
MagicBeanDev:claude/cranky-pike-7cf247
MagicBeanDev:perf/texture-answer-flat
MagicBeanDev:fix/stamp-test-modules
MagicBeanDev:fix/appimage-fonts
MagicBeanDev:fix/display-awake
MagicBeanDev:release/v2.0.12
MagicBeanDev:fix/discord-windows
MagicBeanDev:rc/v2.0.12-tests
MagicBeanDev:fix/dlss-keep-feature
MagicBeanDev:rc/v2.0.12
MagicBeanDev:button-icons
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
autorelease: pending
autorelease: tagged
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
github_actions
Pull requests that update GitHub Actions code
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
question
Further information is requested
testing wanted
wontfix
This will not be worked on
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
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/Hookshot!2747
Loading…
Reference in a new issue
No description provided.
Delete branch "github/pr/2747"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this is for: sprinting needs A held the whole time. Auto run (Controls tab, Off by default) lets the player hold A until Link sprints, let go, and keep sprinting while the stick stays pushed. What is tested: a Windows game run on an RX 6800 XT with an Xbox controller over XInput (Xbox / PC layout), including swimming, ladders and climbing walls, the keyboard alone (Shift as A, W to move), and a new game-free test. Not tested: Epona (not reached yet in the test save), Linux, other controllers.
Problem
In this game A is the run button: pressed while moving, Link rolls, then sprints for as long as A is held. Long runs across Hyrule Field mean holding the bottom face button down the whole time.
What changed
host/auto_run.hholds the logic, game-free.host/nn_hid.cruns it innpad_stateson each controller read, after the flight and the free camera.host/hos_main.cgetshos_oot_player_free(): Link updated within 250 ms with no event playing, noted on his update inhos_oot_lift_player.HOS_OPT_AUTO_RUN = 55(gpu/vk/vk_api.h), answered invk_replay.cpp. I surveyed the open PRs that changevk_api.h: 52/53 (#2345), 52 (#2669, #2604, #2567), 54 (#2567, #2530), 60 (#2261) and 64 (#2607) are taken; 55 is free in main and in those heads.hid: auto run: A kept held for the sprint(once, the first time it keeps A).Testing
In game (Windows 11, RX 6800 XT, Xbox controller over XInput, Xbox / PC layout):
The build tested in game had the same logic on an older main (
8fcc8c22) under the id 52 and the nameskeep_running/run_lock.h. This branch is that change squashed on current main, renamed (auto_run) and moved to id 55; it was not rebuilt and run again after that.tests/test_auto_run.py(new): plays presses through the header and checks that the row, its answer, the call innn_hid.cand the readme are there. Cases:tests/test_input_background.py: its fixture gets the header and ahos_oot_player_freestub. Locally it fails to compile on main too (oc_consumed_pads set but not usedwith llvm-mingw's clang-Wunused-but-set-global), the same astests/test_driver_cache_folder.py(mkdir). Both are unrelated to this change, so I'm leaving them to CI.CI note: after updating the branch, everything passes except Linux AppImage. It fails in the System packages step before anything is built: an
ssl.SSLEOFError: UNEXPECTED_EOF_WHILE_READINGwhile fetching packages, then a timeout (exit code 124), in run 43210240175. The same step failed the same way on the first run, and on other PRs in the same window (fix/prompts-live-hint-bars,feat/keyboard-ocarina-notes,feat/file-backed-pipeline-cache). I can't re-run jobs here; a re-run of the AppImage job should go through once the package mirror answers.The earlier
tests/test_release_scripts.pyfailure (Python source checks, ubuntu part 2) passed on this run; it is unrelated to the change.I merged this into current main (
51da0464). tests/test_auto_run.py and tests/test_input_background.py both pass on Linux with gcc. The appimage failure is the Launchpad SSL timeout in the System packages step, not this change. A re-run should clear it.The state machine in host/auto_run.h reads right. A short press is never kept, a second A press hands control back, Plus/Minus and the Insert menu end it, and the row being off passes the buttons through untouched. Option id 55 is free on main (the highest taken there is 51) and MKWVK_API_VERSION doesn't need a bump, since only an enum is added.
One case I couldn't rule out from the code: the ocarina. oc_pad_word turns A into a note while the game waits for notes. If Link takes out the ocarina while the sprint is kept and the stick is still pushed, the release ends only if oot_event_playing() is true during ocarina play (host/hos_main.c:899). If it isn't, the game would see A held as a note. Could you check that once in game? Ending the kept A while the note wait is active would also cover it. Also, the in-game run was on the older id-52 build, so a quick boot of this exact head would be good before merging.