sceMpegbase: init and shut down from the kernel, like everything else

__MpegBaseInit was called by __MpegInit rather than by __KernelInit, and
__MpegBaseShutdown had just been added the same way. Every other module is
started and stopped directly by the kernel - __MpegBaseDoState already was -
so do the same here and let sceMpeg.cpp mind only its own state.

The order is unchanged: __MpegBaseInit ran first inside __MpegInit and now sits
just before it, __MpegBaseShutdown ran last and now sits just after.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5 committed 2026-09-18 11:38:49 -06:00
1 parent dc743d4fce
commit 8fa0826bdb
3 files changed
+3 -3

No files matched your search

+2
View File
@@ -144,6 +144,7 @@ void __KernelInit()
__PowerInit();
__UtilityInit();
__UmdInit();
__MpegBaseInit();
__MpegInit();
__PsmfInit();
__CtrlInit();
@@ -210,6 +211,7 @@ void __KernelShutdown()
__Mp3Shutdown();
__MpegShutdown();
__MpegBaseShutdown();
__PsmfShutdown();
__PPGeShutdown();
-2
View File
@@ -356,7 +356,6 @@ static void ClearMpegContexts() {
}
void __MpegInit() {
__MpegBaseInit();
// getMpegCtx keys on a handle read out of game memory, so don't leave contexts from a previous
// game around for the next one to find.
ClearMpegContexts();
@@ -414,7 +413,6 @@ void __MpegDoState(PointerWrap &p) {
void __MpegShutdown() {
ClearMpegContexts();
__MpegBaseShutdown();
}
void __MpegLoadModule(int version,u32 crc) {
+1 -1
View File
@@ -25,7 +25,7 @@ class PointerWrap;
void Register_sceMpegbase();
// Called per boot, from __MpegInit and __MpegShutdown.
// Called per boot, from __KernelInit and __KernelShutdown, around sceMpeg's own pair.
void __MpegBaseInit();
void __MpegBaseShutdown();