Keep filehandles open properly when loading state.

This commit is contained in:
Unknown W. Brackets 2013-02-08 08:10:20 -08:00
parent 7806f9835a
commit 3ad565b4df
2 changed files with 3 additions and 1 deletions

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)