Fixed invalid messageID on menus (#529)

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 08:45:50 -03:00 committed by GitHub
parent afc7e8da69
commit 54cd27ccee
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;