sceKernelFindModuleByName:Add delay for Fake module

Fix #13601
This commit is contained in:
sum2012 2021-02-21 08:54:11 +08:00
parent dd980905a2
commit 354d263ccf

View File

@ -2444,12 +2444,18 @@ u32 sceKernelFindModuleByName(const char *name)
PSPModule *module = kernelObjects.Get<PSPModule>(moduleId, error);
if (!module)
continue;
if (!module->isFake && strcmp(name, module->nm.name) == 0) {
if (strcmp(name, module->nm.name) == 0) {
if (!module->isFake) {
INFO_LOG(SCEMODULE, "%d = sceKernelFindModuleByName(%s)", module->modulePtr, name);
return module->modulePtr;
}
else {
WARN_LOG(SCEMODULE, "0 = sceKernelFindModuleByName(%s): Module Fake", name);
return hleDelayResult(0, "Module Fake", 1000 * 1000);
}
WARN_LOG(SCEMODULE, "0 = sceKernelFindModuleByName(%s): Module Not Found or Fake", name);
}
}
WARN_LOG(SCEMODULE, "0 = sceKernelFindModuleByName(%s): Module Not Found", name);
return 0;
}