Start save stating the filesystem state.

Plus minor fixes and at least an attempt to make states the same
on both 32 and 64 bit.
This commit is contained in:
Unknown W. Brackets
2012-12-27 22:14:31 -08:00
parent e3e6f81dfa
commit 4b39e39455
15 changed files with 125 additions and 10 deletions

View File

@@ -367,3 +367,22 @@ size_t MetaFileSystem::SeekFile(u32 handle, s32 position, FileMove type)
return 0;
}
void MetaFileSystem::DoState(PointerWrap &p)
{
p.Do(current);
p.Do(currentDirectory);
int n = (int) fileSystems.size();
p.Do(n);
if (n != fileSystems.size())
{
ERROR_LOG(FILESYS, "Savestate failure: number of filesystems doesn't match.");
return;
}
for (int i = 0; i < n; ++i)
fileSystems[i].system->DoState(p);
p.DoMarker("MetaFileSystem");
}