Fix error sound in when entering load/save menu

This commit is contained in:
Sergeanur 2020-12-29 08:31:38 +02:00
parent c93fb5e443
commit 06df781bca

View File

@ -4552,6 +4552,9 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
} }
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action; int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
#ifdef FIX_BUGS
int currScreen = m_nCurrScreen;
#endif
switch (option) { switch (option) {
case MENUACTION_CHANGEMENU: case MENUACTION_CHANGEMENU:
case MENUACTION_YES: case MENUACTION_YES:
@ -4827,7 +4830,11 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
} }
ProcessOnOffMenuOptions(); ProcessOnOffMenuOptions();
if (!goBack) { if (!goBack) {
#ifdef FIX_BUGS
int saveSlot = aScreens[currScreen].m_aEntries[m_nCurrOption].m_SaveSlot;
#else
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot; int saveSlot = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot;
#endif
if (saveSlot >= SAVESLOT_1 && saveSlot <= SAVESLOT_8 && Slots[m_nCurrOption] != SLOT_OK) if (saveSlot >= SAVESLOT_1 && saveSlot <= SAVESLOT_8 && Slots[m_nCurrOption] != SLOT_OK)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);