fix(sysmodule): unload unknown module ids as no-ops

sceSysmoduleLoadModule and sceSysmoduleIsLoaded already accept ids the
project does not know and log them; unloading such an id threw, so a title
that loads and later unloads an unknown module aborted at the unload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PacukaandClaude Opus 5.5 committed 2026-09-29 21:32:15 +02:00
1 parent 75a8668b5e
commit a2520aa071
1 file changed
+2 -1
+2 -1
View File
@@ -154,7 +154,8 @@ int APS5_VABI sceSysmoduleUnloadModule(std::uint16_t id) {
throw std::runtime_error("sceSysmoduleUnloadModule: invalid id 0");
}
if (!findModuleName(id)) {
throw std::runtime_error(std::string("sceSysmoduleUnloadModule: unknown id ") + std::to_string(id));
APS5_LOG_OUT("unknown id: %u", static_cast<unsigned>(id));
return 0;
}
std::lock_guard<std::mutex> lock(gMutex);
auto it = gLoadCount.find(id);