mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 00:04:49 +02:00
SaveState: Split Do() into a separate header.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/ChunkFileDo.h"
|
||||
#include "Core/FileSystems/VirtualDiscFileSystem.h"
|
||||
#include "Core/FileSystems/ISOFileSystem.h"
|
||||
#include "Core/HLE/sceKernel.h"
|
||||
@@ -167,18 +168,18 @@ void VirtualDiscFileSystem::DoState(PointerWrap &p)
|
||||
int fileListSize = (int)fileList.size();
|
||||
int entryCount = (int)entries.size();
|
||||
|
||||
p.Do(fileListSize);
|
||||
p.Do(entryCount);
|
||||
p.Do(currentBlockIndex);
|
||||
Do(p, fileListSize);
|
||||
Do(p, entryCount);
|
||||
Do(p, currentBlockIndex);
|
||||
|
||||
FileListEntry dummy = {""};
|
||||
fileList.resize(fileListSize, dummy);
|
||||
|
||||
for (int i = 0; i < fileListSize; i++)
|
||||
{
|
||||
p.Do(fileList[i].fileName);
|
||||
p.Do(fileList[i].firstBlock);
|
||||
p.Do(fileList[i].totalSize);
|
||||
Do(p, fileList[i].fileName);
|
||||
Do(p, fileList[i].firstBlock);
|
||||
Do(p, fileList[i].totalSize);
|
||||
}
|
||||
|
||||
if (p.mode == p.MODE_READ)
|
||||
@@ -190,12 +191,12 @@ void VirtualDiscFileSystem::DoState(PointerWrap &p)
|
||||
u32 fd = 0;
|
||||
OpenFileEntry of;
|
||||
|
||||
p.Do(fd);
|
||||
p.Do(of.fileIndex);
|
||||
p.Do(of.type);
|
||||
p.Do(of.curOffset);
|
||||
p.Do(of.startOffset);
|
||||
p.Do(of.size);
|
||||
Do(p, fd);
|
||||
Do(p, of.fileIndex);
|
||||
Do(p, of.type);
|
||||
Do(p, of.curOffset);
|
||||
Do(p, of.startOffset);
|
||||
Do(p, of.size);
|
||||
|
||||
// open file
|
||||
if (of.type != VFILETYPE_ISO) {
|
||||
@@ -222,17 +223,17 @@ void VirtualDiscFileSystem::DoState(PointerWrap &p)
|
||||
{
|
||||
OpenFileEntry &of = it->second;
|
||||
|
||||
p.Do(it->first);
|
||||
p.Do(of.fileIndex);
|
||||
p.Do(of.type);
|
||||
p.Do(of.curOffset);
|
||||
p.Do(of.startOffset);
|
||||
p.Do(of.size);
|
||||
Do(p, it->first);
|
||||
Do(p, of.fileIndex);
|
||||
Do(p, of.type);
|
||||
Do(p, of.curOffset);
|
||||
Do(p, of.startOffset);
|
||||
Do(p, of.size);
|
||||
}
|
||||
}
|
||||
|
||||
if (s >= 2) {
|
||||
p.Do(lastReadBlock_);
|
||||
Do(p, lastReadBlock_);
|
||||
} else {
|
||||
lastReadBlock_ = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user