mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 19:34:39 +01:00
Expand out some savestate code saving non-pod.
This commit is contained in:
1 parent
2a6457b6ab
commit
07a5dca98e
8 files changed
+45
-5
No files matched your search
@@ -247,7 +247,7 @@ void PSPMsgDialog::DoState(PointerWrap &p)
|
||||
p.Do(flag);
|
||||
p.Do(messageDialog);
|
||||
p.Do(messageDialogAddr);
|
||||
p.Do(msgText);
|
||||
p.DoArray(msgText, sizeof(msgText));
|
||||
p.Do(yesnoChoice);
|
||||
p.Do(okButtonImg);
|
||||
p.Do(cancelButtonImg);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../Globals.h"
|
||||
#include "Common.h"
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
#include "sceKernelAlarm.h"
|
||||
#include "sceKernelInterrupt.h"
|
||||
#include "HLE.h"
|
||||
#include "../../Core/CoreTiming.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "ChunkFile.h"
|
||||
#include <list>
|
||||
|
||||
const int NATIVEALARM_SIZE = 20;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "HLE.h"
|
||||
#include "../MIPS/MIPS.h"
|
||||
#include "ChunkFile.h"
|
||||
|
||||
#include "sceKernel.h"
|
||||
#include "sceKernelThread.h"
|
||||
@@ -198,6 +199,14 @@ void IntrHandler::DoState(PointerWrap &p)
|
||||
{
|
||||
p.Do(intrNumber);
|
||||
p.Do<int, SubIntrHandler>(subIntrHandlers);
|
||||
p.DoMarker("IntrHandler");
|
||||
}
|
||||
|
||||
void PendingInterrupt::DoState(PointerWrap &p)
|
||||
{
|
||||
p.Do(intr);
|
||||
p.Do(subintr);
|
||||
p.DoMarker("PendingInterrupt");
|
||||
}
|
||||
|
||||
void __InterruptsInit()
|
||||
@@ -221,7 +230,13 @@ void __InterruptsDoState(PointerWrap &p)
|
||||
|
||||
intState.DoState(p);
|
||||
PendingInterrupt pi(0, 0);
|
||||
p.Do(pendingInterrupts, pi);
|
||||
|
||||
u32 list_size = (u32)pendingInterrupts.size();
|
||||
p.Do(list_size);
|
||||
pendingInterrupts.resize(list_size, pi);
|
||||
for (auto it = pendingInterrupts.begin(), end = pendingInterrupts.end(); it != end; ++it)
|
||||
it->DoState(p);
|
||||
|
||||
p.Do(interruptsEnabled);
|
||||
p.Do(inInterrupt);
|
||||
p.DoMarker("sceKernelInterrupt");
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../../Common/ChunkFile.h"
|
||||
#include <map>
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
enum PSPInterrupt {
|
||||
PSP_GPIO_INTR = 4,
|
||||
@@ -81,6 +83,8 @@ struct PendingInterrupt {
|
||||
PendingInterrupt(int intr_, int subintr_)
|
||||
: intr(intr_), subintr(subintr_) {}
|
||||
|
||||
void DoState(PointerWrap &p);
|
||||
|
||||
int intr;
|
||||
int subintr;
|
||||
};
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "../MIPS/MIPS.h"
|
||||
#include "../../Core/CoreTiming.h"
|
||||
#include "../../Core/MemMap.h"
|
||||
#include "ChunkFile.h"
|
||||
|
||||
#include "sceAudio.h"
|
||||
#include "sceKernel.h"
|
||||
|
||||
@@ -326,9 +326,25 @@ u32 BlockAllocator::GetTotalFreeBytes()
|
||||
void BlockAllocator::DoState(PointerWrap &p)
|
||||
{
|
||||
Block b(0, 0, false);
|
||||
p.Do(blocks, b);
|
||||
|
||||
u32 list_size = (u32)blocks.size();
|
||||
p.Do(list_size);
|
||||
blocks.resize(list_size, b);
|
||||
|
||||
for (auto it = blocks.begin(), end = blocks.end(); it != end; ++it)
|
||||
it->DoState(p);
|
||||
|
||||
p.Do(rangeStart_);
|
||||
p.Do(rangeSize_);
|
||||
p.Do(grain_);
|
||||
p.DoMarker("BlockAllocator");
|
||||
}
|
||||
|
||||
void BlockAllocator::Block::DoState(PointerWrap &p)
|
||||
{
|
||||
p.Do(start);
|
||||
p.Do(size);
|
||||
p.Do(taken);
|
||||
p.DoArray(tag, sizeof(tag));
|
||||
p.DoMarker("Block");
|
||||
}
|
||||
@@ -63,6 +63,7 @@ private:
|
||||
strncpy(tag, "---", 32);
|
||||
tag[31] = 0;
|
||||
}
|
||||
void DoState(PointerWrap &p);
|
||||
u32 start;
|
||||
u32 size;
|
||||
bool taken;
|
||||
|
||||
Reference in new issue
Block a user