mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 00:13:08 +00:00
fixes
This commit is contained in:
parent
4631b87f0c
commit
0d512de332
@ -36,9 +36,7 @@ s32 PS4_SYSV_ABI sceKernelLoadStartModule(const char* moduleFileName, size_t arg
|
|||||||
u32 flags, const void* pOpt, int* pRes) {
|
u32 flags, const void* pOpt, int* pRes) {
|
||||||
LOG_INFO(Lib_Kernel, "called filename = {}, args = {}", moduleFileName, args);
|
LOG_INFO(Lib_Kernel, "called filename = {}, args = {}", moduleFileName, args);
|
||||||
|
|
||||||
if (flags != 0) {
|
ASSERT(flags == 0);
|
||||||
return ORBIS_KERNEL_ERROR_EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string guest_path(moduleFileName);
|
std::string guest_path(moduleFileName);
|
||||||
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||||
@ -52,34 +50,15 @@ s32 PS4_SYSV_ABI sceKernelLoadStartModule(const char* moduleFileName, size_t arg
|
|||||||
if (handle != -1) {
|
if (handle != -1) {
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
ASSERT_MSG(0, "Trying to load system module {}", guest_path);
|
//Trying to load a system module
|
||||||
|
UNREACHABLE();
|
||||||
} else {
|
} else {
|
||||||
auto* process_params = linker->GetProcParam();
|
|
||||||
if (process_params->sdk_version > 0x3ffffff) {
|
|
||||||
if (process_params->process_name != nullptr &&
|
|
||||||
strstr(process_params->process_name, "web_core.elf")) {
|
|
||||||
if (guest_path.contains("libScePigletv2VSH") ||
|
|
||||||
guest_path.contains("libSceSysCore") ||
|
|
||||||
guest_path.contains("libSceVideoCoreServerInterface")) {
|
|
||||||
ASSERT_MSG(0, "Trying to load system module {}", guest_path);
|
|
||||||
} else {
|
|
||||||
// loading prohibited
|
|
||||||
return ORBIS_KERNEL_ERROR_ENOENT;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// loading prohibited
|
|
||||||
return ORBIS_KERNEL_ERROR_ENOENT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!guest_path.contains('/')) {
|
if (!guest_path.contains('/')) {
|
||||||
path = mnt->GetHostPath("/app0/" + guest_path);
|
path = mnt->GetHostPath("/app0/" + guest_path);
|
||||||
handle = linker->LoadAndStartModule(path, args, argp, pRes);
|
handle = linker->LoadAndStartModule(path, args, argp, pRes);
|
||||||
if (handle != -1) {
|
if (handle != -1) {
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
if ((flags & 0x10000) != 0) {
|
|
||||||
ASSERT_MSG(0, "Trying to load system module {}", guest_path);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
path = mnt->GetHostPath(guest_path);
|
path = mnt->GetHostPath(guest_path);
|
||||||
handle = linker->LoadAndStartModule(path, args, argp, pRes);
|
handle = linker->LoadAndStartModule(path, args, argp, pRes);
|
||||||
|
Loading…
Reference in New Issue
Block a user