mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Properly savestate loaded modules.
May fix savestates in games that use modules heavily, like Yu-Gi-Oh, Metal Gear Solid, Tales of Radiant Mythology, and Valkyrie Profile.
This commit is contained in:
parent
d6a2f52e47
commit
996d97a05e
1 changed files with 11 additions and 2 deletions
|
@ -232,7 +232,7 @@ public:
|
|||
|
||||
virtual void DoState(PointerWrap &p)
|
||||
{
|
||||
auto s = p.Section("Module", 1, 2);
|
||||
auto s = p.Section("Module", 1, 3);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
|
@ -250,6 +250,11 @@ public:
|
|||
nm.status = MODULE_STATUS_STOPPED;
|
||||
}
|
||||
|
||||
if (s >= 3) {
|
||||
p.Do(textStart);
|
||||
p.Do(textEnd);
|
||||
}
|
||||
|
||||
ModuleWaitingThread mwt = {0};
|
||||
p.Do(waitingThreads, mwt);
|
||||
FuncSymbolExport fsx = {{0}};
|
||||
|
@ -415,12 +420,16 @@ void __KernelModuleInit()
|
|||
|
||||
void __KernelModuleDoState(PointerWrap &p)
|
||||
{
|
||||
auto s = p.Section("sceKernelModule", 1);
|
||||
auto s = p.Section("sceKernelModule", 1, 2);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
p.Do(actionAfterModule);
|
||||
__KernelRestoreActionType(actionAfterModule, AfterModuleEntryCall::Create);
|
||||
|
||||
if (s >= 2) {
|
||||
p.Do(loadedModules);
|
||||
}
|
||||
}
|
||||
|
||||
void __KernelModuleShutdown()
|
||||
|
|
Loading…
Add table
Reference in a new issue