VSH: A game launched from the XMB exits back to it

On a PSP, sceKernelExitGame in a game the XMB launched goes back to the
XMB. Ours ended the session. In a session booted as vshmain.prx, an exit
from anything but the VSH itself now LoadExecs vshmain.prx again; the
shell then plays its opening and comes back on the Game column.

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-10-21 19:00:01 +02:00
1 parent cf29cbdfd7
commit 9fec7d7fb0
3 files changed
+28

No files matched your search

+17
View File
@@ -2678,6 +2678,23 @@ int sceKernelLoadExec(MIPSState *mips, const char *filename, u32 paramPtr) {
return hleLogDebug(Log::sceModule, 0);
}
bool __KernelExitToVSH(MIPSState *mips) {
// A session that started in the XMB, running a game it launched. The XMB itself exiting (power
// off) still ends the session.
if (PSP_CoreParameter().fileToStart.GetFilename() != "vshmain.prx" || g_runningVSH) {
return false;
}
std::string error_string;
if (!__KernelLoadExec(mips, "flash0:/vsh/module/vshmain.prx", 0, &error_string)) {
ERROR_LOG(Log::sceModule, "Couldn't return to the VSH: %s", error_string.c_str());
return false;
}
if (gpu) {
gpu->Reinitialize();
}
return true;
}
static u32 KernelLoadModuleFromData(const char *name, std::vector<uint8_t> &fileData, u32 flags, const SceKernelLMOption *lmoption, bool *tryLoadExec, const u8 *secureId = nullptr, const u32 *fuseId = nullptr);
// What sceKernelLoadModule does once the file has been read: decrypt the module, place it in memory