mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 13:36:24 +02:00
When loading a savestate with more ram, realloc.
Also, I'm not sure the extra ram is being handled correctly, I think it's not meant to be exposed to games except homebrew, not sure of the exact method...
This commit is contained in:
1 parent
eea5b07e1a
commit
d09575f25e
1 file changed
+7
-1
+7
-1
@@ -136,10 +136,16 @@ void DoState(PointerWrap &p)
|
||||
g_MemorySize = RAM_NORMAL_SIZE;
|
||||
g_PSPModel = PSP_MODEL_FAT;
|
||||
} else {
|
||||
u32 oldMemorySize = g_MemorySize;
|
||||
p.Do(g_PSPModel);
|
||||
p.DoMarker("PSPModel");
|
||||
if (!g_RemasterMode)
|
||||
if (!g_RemasterMode) {
|
||||
g_MemorySize = g_PSPModel == PSP_MODEL_FAT ? RAM_NORMAL_SIZE : RAM_DOUBLE_SIZE;
|
||||
if (oldMemorySize < g_MemorySize) {
|
||||
Shutdown();
|
||||
Init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p.DoArray(GetPointer(PSP_GetKernelMemoryBase()), g_MemorySize);
|
||||
|
||||
Reference in new issue
Block a user