mirror of https://github.com/PCSX2/pcsx2.git
Refresh the save slots if either the crc *or* the serial number are different. (Needed for ps1 saves.)
This commit is contained in:
parent
fc1d9aef09
commit
8f52d82e58
|
@ -36,6 +36,8 @@
|
||||||
//#define SAVESLOT_LOGS
|
//#define SAVESLOT_LOGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern wxString DiscSerial;
|
||||||
|
|
||||||
class Saveslot
|
class Saveslot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -43,6 +45,7 @@ public:
|
||||||
bool empty;
|
bool empty;
|
||||||
wxDateTime updated;
|
wxDateTime updated;
|
||||||
u32 crc;
|
u32 crc;
|
||||||
|
wxString serialName;
|
||||||
bool menu_update, invalid_cache;
|
bool menu_update, invalid_cache;
|
||||||
|
|
||||||
Saveslot()
|
Saveslot()
|
||||||
|
@ -51,6 +54,7 @@ public:
|
||||||
empty = true;
|
empty = true;
|
||||||
updated = wxInvalidDateTime;
|
updated = wxInvalidDateTime;
|
||||||
crc = ElfCRC;
|
crc = ElfCRC;
|
||||||
|
serialName = DiscSerial;
|
||||||
menu_update = false;
|
menu_update = false;
|
||||||
invalid_cache = true;
|
invalid_cache = true;
|
||||||
}
|
}
|
||||||
|
@ -61,6 +65,7 @@ public:
|
||||||
empty = true;
|
empty = true;
|
||||||
updated = wxInvalidDateTime;
|
updated = wxInvalidDateTime;
|
||||||
crc = ElfCRC;
|
crc = ElfCRC;
|
||||||
|
serialName = DiscSerial;
|
||||||
menu_update = false;
|
menu_update = false;
|
||||||
invalid_cache = true;
|
invalid_cache = true;
|
||||||
}
|
}
|
||||||
|
@ -82,6 +87,7 @@ public:
|
||||||
empty = !isUsed();
|
empty = !isUsed();
|
||||||
updated = GetTimestamp();
|
updated = GetTimestamp();
|
||||||
crc = ElfCRC;
|
crc = ElfCRC;
|
||||||
|
serialName = DiscSerial;
|
||||||
invalid_cache = false;
|
invalid_cache = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,8 @@ static void _SaveLoadStuff(bool enabled)
|
||||||
int load_menu_item = MenuId_State_Load01 + i + 1;
|
int load_menu_item = MenuId_State_Load01 + i + 1;
|
||||||
int save_menu_item = MenuId_State_Save01 + i + 1;
|
int save_menu_item = MenuId_State_Save01 + i + 1;
|
||||||
|
|
||||||
// We need to reload the file information if the crc changed.
|
// We need to reload the file information if the crc or serial # changed.
|
||||||
if (saveslot_cache[i].crc != ElfCRC) saveslot_cache[i].invalid_cache = true;
|
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.
|
// Either the cache needs updating, or the menu items do, or both.
|
||||||
if (saveslot_cache[i].menu_update || saveslot_cache[i].invalid_cache)
|
if (saveslot_cache[i].menu_update || saveslot_cache[i].invalid_cache)
|
||||||
|
|
Loading…
Reference in New Issue