diff options
Diffstat (limited to 'src/port/ui/Menu.h')
| -rw-r--r-- | src/port/ui/Menu.h | 44 |
1 files changed, 4 insertions, 40 deletions
diff --git a/src/port/ui/Menu.h b/src/port/ui/Menu.h index f3b2fd3dd..7e84e5d26 100644 --- a/src/port/ui/Menu.h +++ b/src/port/ui/Menu.h @@ -62,46 +62,10 @@ class Menu : public GuiWindow { "Searches all menus for the given text, including tooltips.")) } } } }; virtual void ProcessReset() { - gGamestateNext = MAIN_MENU_FROM_QUIT; - gIsGamePaused = 0; - // Reset credits - D_800DC5E4 = 0; - gTourComplete = false; - SetMarioRaceway(); - memset(&gGameModeMenuColumn, 0, sizeof(s8) * NUM_ROWS_GAME_MODE_MENU); - memset(&gGameModeSubMenuColumn, 0, sizeof(s8) * NUM_COLUMN_GAME_MODE_SUB_MENU * NUM_ROWS_GAME_MODE_SUB_MENU); - - CM_ResetAudio(); - - switch(CVarGetInteger("gSkipIntro", 0)) { - case 0: - gMenuSelection = HARBOUR_MASTERS_MENU; - break; - case 1: - gMenuSelection = LOGO_INTRO_MENU; - break; - case 2: - gMenuSelection = START_MENU; - break; - case 3: - gMenuSelection = MAIN_MENU; - break; - } - - // Close the editor. - if (gEditor.IsEnabled()) { - gEditor.Disable(); - } - - // Set the debug menu track browsing index back to zero - TrackBrowser::Instance->Reset(); - - // Debug mode override gSkipIntro - if (CVarGetInteger("gEnableDebugMode", 0) == true) { - gMenuSelection = START_MENU; - } else { - gMenuSelection = LOGO_INTRO_MENU; - } + // Only request the reset: it is applied at the top of the next game + // frame (ApplyPendingReset in Game.cpp), where it cannot race the menu + // state machine mid-fade or be swallowed as a repeated gamestate write. + CM_RequestReset(); } private: |
