From 9ffdb8342375c5642bed38d30cae4a209df70fe5 Mon Sep 17 00:00:00 2001 From: quarrel07 <178681861+quarrel07@users.noreply.github.com> Date: Sun, 26 Jul 2026 21:18:15 -0700 Subject: Don't let the attract timer hijack an in-flight menu fade (#723) Pressing start on the splash screen in the last moments before the demo timeout could play the enter chime and then drop into the demo reel with no music: the attract timer (gMenuTimingCounter >= 0x12D) fired while the press-start fade was in flight and overwrote gMenuFadeType to the demo value, so the fade completed as a demo entry. Vanilla bug; roughly a 0.7-second window every attract cycle. Only arm the demo when no fade is in flight. A natural timeout (idle, no fade running) behaves exactly as before. Play-verified: start pressed repeatedly around the timeout boundary always lands in the main menu with music; the demo reel still plays when idle. --- src/menu_items.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/menu_items.c b/src/menu_items.c index 375258be1..243f1aab0 100644 --- a/src/menu_items.c +++ b/src/menu_items.c @@ -2847,7 +2847,11 @@ void func_80095574(void) { if (gMenuTimingCounter == DEBUG_MENU_DEBUG_MODE) { play_sound2(SOUND_INTRO_WELCOME); } - if (gMenuTimingCounter >= 0x12D) { + // Don't arm the demo reel while another fade is in flight: pressing start + // in the last moments before the attract timeout let this overwrite the + // press-start fade's gMenuFadeType mid-fade, hijacking it into the demo + // with the menu music already faded out. (Vanilla bug.) + if (gMenuTimingCounter >= 0x12D && is_screen_being_faded() == 0) { func_8009E230(); func_800CA0A0(); } -- cgit v1.2.3