Rewrite callback handling, part 1. All sorts of other fixes too.

This commit is contained in:
Henrik Rydgard
2012-11-06 15:46:46 +01:00
parent 91eeed6408
commit c61d10363a
26 changed files with 642 additions and 426 deletions
+11
View File
@@ -146,6 +146,17 @@ Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, std::string *erro
ptr = newptr;
pspDecryptPRX(in, (u8*)ptr, head->psp_size);
}
if (*(u32*)ptr == 0x4543537e) { // "~SCE"
ERROR_LOG(HLE, "Wrong magic number %08x (~SCE, kernel module?)",*(u32*)ptr);
*error_string = "Kernel module?";
if (newptr)
{
delete [] newptr;
}
kernelObjects.Destroy<Module>(module->GetUID());
return 0;
}
if (*(u32*)ptr != 0x464c457f)
{