Register another function in ModuleMgrForKernel. Logging cleanup

This commit is contained in:
Henrik Rydgård committed 2026-04-14 12:41:14 -06:00
1 parent 91c55b89d7
commit eca6f98a53
2 files changed
+8 -6

No files matched your search

+7 -5
View File
@@ -70,6 +70,8 @@ static PluginInfo ReadPluginIni(const std::string &subdir, IniFile &ini) {
info.memory = 0;
options->Get("version", &info.version);
options->Get("memory", &info.memory);
// TODO: Why this specific limit?
if (info.memory > 93) {
ERROR_LOG(Log::System, "Plugin memory too high, using 93 MB");
info.memory = 93;
@@ -184,23 +186,23 @@ bool Load(PSPModule *pluginWaitingModule, SceUID threadID) {
for (const std::string &filename : prxPlugins) {
if (!g_Config.bEnablePlugins) {
WARN_LOG(Log::System, "Plugins are disabled, ignoring enabled plugin %s", filename.c_str());
WARN_LOG(Log::System, "Plugins are disabled, ignoring enabled plugin '%s'", filename.c_str());
continue;
}
std::string error_string = "";
SceUID module = KernelLoadModule(filename, &error_string);
if (!error_string.empty() || module < 0) {
ERROR_LOG(Log::System, "Unable to load plugin %s (module %d): '%s'", filename.c_str(), module, error_string.c_str());
ERROR_LOG(Log::System, "Unable to load plugin '%s' (module %d): '%s'", filename.c_str(), module, error_string.c_str());
continue;
}
int ret = __KernelStartModule(module, 0, 0, 0, nullptr, nullptr);
if (ret < 0) {
ERROR_LOG(Log::System, "Unable to start plugin %s: %08x", filename.c_str(), ret);
ERROR_LOG(Log::System, "Unable to start plugin '%s': %08x", filename.c_str(), ret);
} else {
std::string shortName = Path(filename).GetFilename();
g_OSD.Show(OSDType::MESSAGE_SUCCESS, ApplySafeSubstitutions(sy->T("Loaded plugin: %1"), shortName), 6.0f);
g_OSD.Show(OSDType::MESSAGE_SUCCESS, ApplySafeSubstitutions(sy->T("Loaded plugin: '%1'"), shortName), 6.0f);
started = true;
pluginWaitingModule->startingPlugins.push_back(module);
u32 error;
@@ -208,7 +210,7 @@ bool Load(PSPModule *pluginWaitingModule, SceUID threadID) {
plugin_module->pluginWaitingThread = threadID;
}
INFO_LOG(Log::System, "Loaded plugin: %s", filename.c_str());
INFO_LOG(Log::System, "Loaded plugin: '%s'", filename.c_str());
}
std::lock_guard<std::mutex> guard(g_inputMutex);
+1 -1
View File
@@ -2639,7 +2639,6 @@ const HLEFunction ModuleMgrForUser[] = {
{0XFBE27467, nullptr, "ModuleMgrForUser_FBE27467", '?', "" },
};
const HLEFunction ModuleMgrForKernel[] = {
{0x50F0C1EC, &WrapU_UUUUU<sceKernelStartModule>, "sceKernelStartModule", 'v', "xxxxx", HLE_NOT_IN_INTERRUPT | HLE_NOT_DISPATCH_SUSPENDED | HLE_KERNEL_SYSCALL },
{0x977DE386, &WrapU_CUU<sceKernelLoadModule>, "sceKernelLoadModule", 'x', "sxx", HLE_KERNEL_SYSCALL },
@@ -2649,6 +2648,7 @@ const HLEFunction ModuleMgrForKernel[] = {
{0x748CBED9, &WrapU_UU<sceKernelQueryModuleInfo>, "sceKernelQueryModuleInfo", 'x', "xx", HLE_KERNEL_SYSCALL },
{0x644395E2, &WrapU_UUU<sceKernelGetModuleIdList>, "sceKernelGetModuleIdList", 'x', "xxx", HLE_KERNEL_SYSCALL },
{0X2E0911AA, &WrapU_U<sceKernelUnloadModule>, "sceKernelUnloadModule", 'x', "x" , HLE_KERNEL_SYSCALL },
{0xD675EBB8, &WrapU_UUU<sceKernelSelfStopUnloadModule>, "sceKernelSelfStopUnloadModule", 'x', "xxx", HLE_KERNEL_SYSCALL },
};
void Register_ModuleMgrForUser() {