Fixed invalid messageID on menus

Fixed entering an invalid messageID state from copy menu, fixing the famous file select screen crash.
This commit is contained in:
Giuliano De Pian 2023-07-01 01:48:04 -03:00 committed by GitHub
parent afc7e8da69
commit 93612799e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -836,7 +836,7 @@ void check_copy_menu_clicked_buttons(struct Object *copyButton) {
// If menu button clicked, select it
if (buttonID == MENU_BUTTON_COPY_RETURN || buttonID == MENU_BUTTON_COPY_CHECK_SCORE
|| buttonID == MENU_BUTTON_COPY_ERASE_FILE) {
if (copyButton->oMenuButtonActionPhase == COPY_PHASE_MAIN) {
if (copyButton->oMenuButtonActionPhase == COPY_PHASE_MAIN && sMainMenuTimer >= ACTION_TIMER) {
play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs);
sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT;
sSelectedButtonID = buttonID;