mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 01:49:42 -06:00
SRAM things (#970)
* Allow SRAMManager to save to/load from a buffer. * Don't delete what doesn't exist. Don't create a thread that will do absolutely nothing. * Update SRAMManager's SecondaryBuffer when loading a savestate.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user