mirror of https://github.com/PCSX2/pcsx2.git
gui: Don't check if the backup menu option should be enabled every UI event
This commit is contained in:
parent
717677402c
commit
b7d01b4889
|
@ -51,11 +51,16 @@ static void _SaveLoadStuff(bool enabled)
|
||||||
sMainFrame.EnableMenuItem(MenuId_Sys_SaveStates, enabled);
|
sMainFrame.EnableMenuItem(MenuId_Sys_SaveStates, enabled);
|
||||||
|
|
||||||
#ifdef USE_NEW_SAVESLOTS_UI
|
#ifdef USE_NEW_SAVESLOTS_UI
|
||||||
|
bool crcChanged = false;
|
||||||
// Run though all the slots. Update if they need updating or the crc changed.
|
// Run though all the slots. Update if they need updating or the crc changed.
|
||||||
for (Saveslot &slot : saveslot_cache)
|
for (Saveslot &slot : saveslot_cache)
|
||||||
{
|
{
|
||||||
// We need to reload the file information if the crc or serial # changed.
|
// We need to reload the file information if the crc or serial # changed.
|
||||||
if ((slot.crc != ElfCRC)|| (slot.serialName != DiscSerial)) slot.invalid_cache = true;
|
if ((slot.crc != ElfCRC)|| (slot.serialName != DiscSerial))
|
||||||
|
{
|
||||||
|
slot.invalid_cache = true;
|
||||||
|
crcChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Either the cache needs updating, or the menu items do, or both.
|
// Either the cache needs updating, or the menu items do, or both.
|
||||||
if (slot.menu_update || slot.invalid_cache)
|
if (slot.menu_update || slot.invalid_cache)
|
||||||
|
@ -85,7 +90,10 @@ static void _SaveLoadStuff(bool enabled)
|
||||||
sMainFrame.SetMenuItemLabel(slot.save_item_id, slot.SlotName());
|
sMainFrame.SetMenuItemLabel(slot.save_item_id, slot.SlotName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (crcChanged)
|
||||||
|
{
|
||||||
States_updateLoadBackupMenuItem();
|
States_updateLoadBackupMenuItem();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue