summaryrefslogtreecommitdiff
path: root/src/save/PCSave.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-07-12 01:07:32 +0300
committerGitHub <noreply@github.com>2021-07-12 01:07:32 +0300
commit02e84b4b978b2d17ae9a52ae95b2617902c94150 (patch)
tree6721fa10727d0fb7221e0c7131a78c56b5a47df2 /src/save/PCSave.cpp
parentdc29e7c0441af00393364025ba57330292743544 (diff)
parent6f103a3b8246ed4a883abaea63c6682cdefc6752 (diff)
Merge pull request #1150 from withmorten/miami-saves
miami: finish COMPATIBLE_SAVES and FIX_INCOMPATIBLE_SAVES
Diffstat (limited to 'src/save/PCSave.cpp')
-rw-r--r--src/save/PCSave.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/save/PCSave.cpp b/src/save/PCSave.cpp
index c9045705..a33e9d90 100644
--- a/src/save/PCSave.cpp
+++ b/src/save/PCSave.cpp
@@ -122,6 +122,13 @@ C_PcSave::PopulateSlotInfo()
}
if (Slots[i] == SLOT_OK) {
if (CheckDataNotCorrupt(i, savename)) {
+#ifdef FIX_INCOMPATIBLE_SAVES
+ if (!FixSave(i, GetSaveType(savename))) {
+ CMessages::InsertNumberInString(TheText.Get("FEC_SLC"), i + 1, -1, -1, -1, -1, -1, SlotFileName[i]);
+ Slots[i] = SLOT_CORRUPTED;
+ continue;
+ }
+#endif
SYSTEMTIME st;
memcpy(&st, &header.SaveDateTime, sizeof(SYSTEMTIME));
const char *month;