feat(menu): skip the title screen and load the newest save #1560
Open
nicholasgower wants to merge 1 commit from
nicholasgower/feat/skip-title-screen into main
pull from: nicholasgower/feat/skip-title-screen
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/2747
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!1560
Loading…
Reference in a new issue
No description provided.
Delete branch "nicholasgower/feat/skip-title-screen"
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?
Why
On PC every launch starts at the intro and title, even when the player is carrying on from a save. This adds a Gameplay option that presses through to the game's save instead.
What
skip_title_screen, and exposes it to the host asHOS_OPT_SKIP_TITLE.host/oot_autoload.clooks for the newestprogress.savunderuser/save/<profile>/slot_*and, once the intro/title is up, sends A presses through the title and its file list.host/nn_hid.cand a player-seen signal inhost/hos_main.c.Tests
python -I -B tests/test_skip_title.py --cc gccpython -I -B tests/test_input_background.py --cc gcctest_rumble_menu,test_menu_restart,test_menu_keys,test_menu_hit,test_menu_utf8,test_stick_dead_zone,test_text_speed,test_audio_output_menu,test_output_resolution,test_startup_progress,test_game_font.Not run in the game here because this machine has no game dump; the title/load transition still needs a local play test. For the same reason there is no screenshot of the new row.
Looks good. I read through the new host/oot_autoload.c and checked it against main; I did not run it in game, and the PR says the same about the title-to-load transition, so that still needs a local play test.
Things I checked: option id 44 is free (40-43 are the HDR and Discord ids), the ini key comes out as
skip_title_screenfrom the row name like the other rows,hos_user_dirand thesave/<profile>/slot_*/progress.savlayout match nn_fs.c and docs/saves.md,hos_oot_lift_playeris patched in unconditionally (not only with the debug tools on), sohos_oot_player_seen()really does stop the presses once Link is running, and the new test is registered in run_all.py. CI is green on Linux and Windows.Nits, none blocking:
Let's discuss approach for this in Discord, we'll circle back around to this
Heads-up: this conflicts with main now (a lot landed today). Could you merge main into the branch (or rebase) and resolve the conflicts? Thanks!
I rebased this onto current
mainon Linux to try it (head1fc9986fonto49f75dc8). Two things that may save you time; I have not run it in the game yet and will add what Linux with an RTX 4090 shows when I have.1. After the conflicts are resolved it still does not compile on
main.maingot ahos_hid_tapof its own ina93b8694(2026-11-09, "Input: presses, a stick and a drag from the host", for the game menus' mouse;host/nn_hid.c:443onmain). That commit is not in this branch's base, git reports no conflict there, and the two definitions meet only in the compiler:main's function takes the same text (presses in the input script's syntax, timed from now; the next controller read takes them), sohost/oot_autoload.ccan call it as it is. Suggested fix: drop this pull request's copy fromhost/nn_hid.cand keep only the call tohos_oot_autoload_input()inread_input:With that removed the host and the renderer compile and the game links here (clang 23, Linux; Windows not built), and
tests/test_skip_title.py --cc gccandtests/test_input_background.py --cc gccpass.2. The five conflicts, and how I resolved each (in case it helps the rebase):
gpu/vk/vk_api.h:mainnow hasHOS_OPT_DISABLE_CAMERA_CENTERING = 45in an enum of its own, with a comment that 44 is reserved forHOS_OPT_SKIP_TITLE. Your enum line withHOS_OPT_SKIP_TITLEafterHOS_OPT_DISCORDstill gives 44; the "44 is reserved" words can go.gpu/vk/vk_menu.cpp: the row goes aftermain's new Text size row. TheAudio outputrow in your hunk's context has moved to the Audio tab onmain, so it must not come back on the Gameplay tab.gpu/vk/vk_replay.cpp: theHOS_OPT_SKIP_TITLEanswer besidemain's new ones (volume, mute in background, camera centering, text size).readme.md: the table row after Text size, the bullet after Menu size (whose text changed onmain).tests/run_all.py: since0876097b(#1822) a test names its own arguments, so theARGSentry becomesRUN_ALL_ARGS = ["--cc", "gcc"]at the top oftests/test_skip_title.py.The rebased branch with that fix is
pr1560-rebasedin my clone; I can push it to my fork if you want to take it from there.Heads-up: this conflicts with main now. Could you rebase onto main and resolve the conflicts? Thanks!
Here is the Linux game test promised above. Tested build: your
1fc9986flocally rebased onto49f75dc8, with the duplicatehos_hid_tapremoved as described in my earlier comment:fb56bc33(v2.1.0-rc.3-55-gfb56bc33). This is not a run of current main or Windows. Arch Linux, RTX 4090, NVIDIA 615.78.08, headless,skip_title_screen=1; no manual load presses.skip title: loaded, the player is running; the picture shows Link in the world with the HUD.skip title: no saved game yet: the title screen stays.slot_01/progress.sav, then crashed with SIGSEGV. It did not open the olderslot_00/progress.savbefore the crash.The negative test altered only a disposable copy, not an original save. The last panel is the final captured loading frame, not a screenshot of the crash. The log then records:
The process exited 139; coredumpctl confirms SIGSEGV. No device-loss or kernel driver-fault line was reported. The harness's
crash=21counts crash-log lines, not 21 separate crashes.From the host code:
hos_oot_newest_savechecks paths/mtimes, not save validity, and the result only enables A presses; the game chooses the slot, not this helper. So file presence is not proof that continuing is safe. This negative result does not establish a regression introduced by this PR: I have not run manual Continue on the same corrupted copy without auto-load, and the underlying load path may fail the same way.Normal save/no-save behavior is demonstrated on this Linux build. Corrupt-save recovery, current main, Windows, and physical keyboard/controller input remain untested. No save data, game binary or core dump is attached.
hckrman101's change request is about the approach and is still open, so this needs that decision first. Main has already reserved option id 44 for
HOS_OPT_SKIP_TITLE(vk_api.h:36), so nothing else has taken it.For the rebase: it conflicts in
vk_api.h,vk_menu.cpp,vk_replay.cpp,nn_hid.c,readme.mdandtests/run_all.py. Main now has its ownhos_hid_tapathost/nn_hid.c:457, so this PR's copy causes a redefinition error, as mooki000 showed. Drop yours and call main's.On the approach itself:
hos_oot_autoload_inputsends0:A/200every 2 s, from 20 s to 120 s, without knowing what's on screen. It stops only when the player is seen, the Insert menu opens, or it times out. Any prompt in that window gets A: a damaged-save notice, a confirmation, or a menu the player opened on the title. mooki000's test with a truncated newest save ended in a crash afterOpenFile(slot_01/progress.sav). Whatever the design, I'd want the presses to stop as soon as the player touches a control. I'd also want an answer on whether A on any title or file-list prompt can delete or overwrite a save.