Permalink
Browse files

Refresh the save slots if either the crc *or* the serial number are d…

…ifferent. (Needed for ps1 saves.)
  • Loading branch information...
arcum42 committed Oct 28, 2018
1 parent fc1d9ae commit 8f52d82e580ded03c0a89438c321de66fbea6eb3
Showing with 8 additions and 2 deletions.
  1. +6 −0 pcsx2/gui/Saveslots.h
  2. +2 −2 pcsx2/gui/UpdateUI.cpp
View
@@ -36,13 +36,16 @@
//#define SAVESLOT_LOGS
#endif
extern wxString DiscSerial;
class Saveslot
{
public:
u32 slot_num;
bool empty;
wxDateTime updated;
u32 crc;
wxString serialName;
bool menu_update, invalid_cache;
Saveslot()
@@ -51,6 +54,7 @@ class Saveslot
empty = true;
updated = wxInvalidDateTime;
crc = ElfCRC;
serialName = DiscSerial;
menu_update = false;
invalid_cache = true;
}
@@ -61,6 +65,7 @@ class Saveslot
empty = true;
updated = wxInvalidDateTime;
crc = ElfCRC;
serialName = DiscSerial;
menu_update = false;
invalid_cache = true;
}
@@ -82,6 +87,7 @@ class Saveslot
empty = !isUsed();
updated = GetTimestamp();
crc = ElfCRC;
serialName = DiscSerial;
invalid_cache = false;
}
View
@@ -50,8 +50,8 @@ static void _SaveLoadStuff(bool enabled)
int load_menu_item = MenuId_State_Load01 + i + 1;
int save_menu_item = MenuId_State_Save01 + i + 1;
// We need to reload the file information if the crc changed.
if (saveslot_cache[i].crc != ElfCRC) saveslot_cache[i].invalid_cache = true;
// We need to reload the file information if the crc or serial # changed.
if ((saveslot_cache[i].crc != ElfCRC)|| (saveslot_cache[i].serialName != DiscSerial)) saveslot_cache[i].invalid_cache = true;
// Either the cache needs updating, or the menu items do, or both.
if (saveslot_cache[i].menu_update || saveslot_cache[i].invalid_cache)

0 comments on commit 8f52d82

Please sign in to comment.