aboutsummaryrefslogtreecommitdiff
path: root/src/NDSCart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/NDSCart.cpp')
-rw-r--r--src/NDSCart.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp
index ae051bd..f08e5da 100644
--- a/src/NDSCart.cpp
+++ b/src/NDSCart.cpp
@@ -111,6 +111,10 @@ void DoSavestate(Savestate* file)
file->Var8(&StatusReg);
file->Var32(&Addr);
+
+ // SRAMManager might now have an old buffer (or one from the future or alternate timeline!)
+ if (!file->Saving)
+ NDSCart_SRAMManager::RequestFlush();
}
void LoadSave(const char* path, u32 type)
@@ -145,6 +149,7 @@ void LoadSave(const char* path, u32 type)
}
}
+ SRAMFileDirty = false;
NDSCart_SRAMManager::Setup(path, SRAM, SRAMLength);
switch (SRAMLength)