From b12fbb9d3e1b7d25ed9ea5286bc19b34c0941196 Mon Sep 17 00:00:00 2001 From: sum2012 Date: Fri, 18 Sep 2015 19:45:23 +0800 Subject: [PATCH] Attempt to make save status --- Core/HLE/sceKernelMemory.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp index 44c193851c..4af7629cd6 100644 --- a/Core/HLE/sceKernelMemory.cpp +++ b/Core/HLE/sceKernelMemory.cpp @@ -2313,10 +2313,30 @@ struct HeapInformation : public KernelObject { BlockAllocator alloc; static int GetStaticIDType() { return SCE_KERNEL_TMID_Fpl; }// wrong int GetIDType() const override { return SCE_KERNEL_TMID_Fpl; }// wrong + + void DoState(PointerWrap &p) { + p.Do(uid); + p.Do(partitionId); + p.Do(size); + p.Do(flags); + p.Do(address); + p.Do(name); + p.Do(alloc); + } }; std::map heapInformationList; +void __HeapInformationDoState(PointerWrap &p) { + auto s = p.Section("kernelHeap", 1); + if (!s) + return; + + if (s >= 1) { + p.Do(heapInformationList); + } +} + static HeapInformation *getHeap(u32 heapId) { auto found = heapInformationList.find(heapId); if (found == heapInformationList.end()) {