Skip to content

Commit dde8d22

Browse files
committed
Merge pull request #20573 from hrydgard/thug-fix
Fix crash on second logo in Tony Hawk's Underground 2
1 parent 8158370 commit dde8d22

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Core/HLE/sceKernelModule.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,13 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
12441244

12451245
modinfo = (const PspModuleInfo *)Memory::GetPointerUnchecked(modinfoaddr);
12461246

1247+
// OK, even if it's an ELF module, it might be one we shouldn't fully load and execute!
1248+
// This is seen with mpeg.prx in Tony Hawk's Underground 2, see #20568.
1249+
if (ShouldHLEModule(modinfo->name)) {
1250+
// We load it, but at least we don't run any part of it.
1251+
module->isFake = true;
1252+
}
1253+
12471254
module->nm.nsegment = reader.GetNumSegments();
12481255
module->nm.attribute = modinfo->moduleAttrs;
12491256
module->nm.version[0] = modinfo->moduleVersion & 0xFF;
@@ -2074,7 +2081,7 @@ static u32 sceKernelStartModule(u32 moduleId, u32 argsize, u32 argAddr, u32 retu
20742081
module->nm.status = MODULE_STATUS_STARTING;
20752082
module->waitingThreads.push_back(mwt);
20762083
}
2077-
return hleLogInfo(Log::sceModule, ret);
2084+
return hleLogInfo(Log::sceModule, ret, "'%.*s'", (int)sizeof(module->nm.name), module->nm.name);
20782085
}
20792086
}
20802087

0 commit comments

Comments
 (0)