Savestate: Fix loading kernel heaps and pre-exit-callback states

KernelHeap was missing from CreateByIDType, and an unknown type returned
without an error, desyncing the rest of the load. States from before exit
callbacks kept the boot-time action slot, which sceMpeg's restore took over.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-28 09:34:05 -06:00
1 parent 797957ea25
commit d28b79960b
4 files changed
+17 -2

No files matched your search

+4
View File
@@ -849,6 +849,10 @@ void __KernelThreadingDoState(PointerWrap &p)
if (s >= 5) {
Do(p, actionAfterExitCallback);
__KernelRestoreActionType(actionAfterExitCallback, ActionAfterExitCallback::Create);
} else {
// Older states numbered the action types without this one, so the slot it got at boot may
// now be restored to another type (sceMpeg's). Give it a new one after all of those.
actionAfterExitCallback = __KernelRegisterActionType(ActionAfterExitCallback::Create);
}
Do(p, pausedDelays);