Merge pull request #623 from unknownbrackets/savestates

Fix some file-related savestate issues
This commit is contained in:
Henrik Rydgård 2013-02-09 00:18:01 -08:00
commit dd61552364
3 changed files with 5 additions and 2 deletions

View File

@ -146,9 +146,10 @@ public:
p.Do(callbackID);
p.Do(callbackArg);
p.Do(asyncResult);
p.Do(closePending);
p.Do(pendingAsyncResult);
p.Do(sectorBlockMode);
p.Do(closePending);
p.Do(info);
p.Do(openMode);
p.DoMarker("File");
}

View File

@ -157,6 +157,7 @@ void __KernelDoState(PointerWrap &p)
p.DoMarker("KernelObjects");
__InterruptsDoState(p);
// Memory needs to be after kernel objects, which may free kernel memory.
__KernelMemoryDoState(p);
__KernelThreadingDoState(p);
__KernelAlarmDoState(p);

View File

@ -77,9 +77,10 @@ namespace SaveState
Memory::DoState(p);
MemoryStick_DoState(p);
currentMIPS->DoState(p);
pspFileSystem.DoState(p);
HLEDoState(p);
__KernelDoState(p);
// Kernel object destructors might close open files, so do the filesystem last.
pspFileSystem.DoState(p);
}
void Enqueue(SaveState::Operation op)