diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index c6ed0bfeb5..44c7030e20 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -2835,7 +2835,9 @@ struct GetModuleIdByAddressArg // needs the callee's gp in place. libmp4.prx uses it on the three callbacks it is given. // Named after what it does; the official name isn't known. static u32 sceKernelGetModuleGPByAddress(u32 addr, u32 gpPtr) { - if (!Memory::IsValidAddress(gpPtr)) { + // Four bytes get written, so check for four - IsValidAddress would pass on the last three + // bytes of a region. + if (!Memory::IsValidRange(gpPtr, 4)) { return hleLogError(Log::sceModule, SCE_KERNEL_ERROR_ILLEGAL_ADDR, "bad gp pointer"); } diff --git a/Core/HLE/sceUtility.cpp b/Core/HLE/sceUtility.cpp index 1f1f90f14c..2eb935507d 100644 --- a/Core/HLE/sceUtility.cpp +++ b/Core/HLE/sceUtility.cpp @@ -92,7 +92,10 @@ static void NotifyLoadStatusAvcodec(int state, u32 loadAddr, u32 totalSize) { static SceUID g_mp4RealModules[2] = { 0, 0 }; static void NotifyLoadStatusMp4(int state, u32 loadAddr, u32 totalSize) { - if (!((DisableHLEFlags)g_Config.iDisableHLE & DisableHLEFlags::sceMp4)) { + // The effective flags, not the raw setting: those also account for a firmware dump that isn't + // there or is too old to have sceMp4 (which is the whole point of CheckDisableHLEAvailability), + // for the compat flags. + if (!(GetEffectiveDisableHLEFlags() & DisableHLEFlags::sceMp4)) { return; } @@ -122,9 +125,6 @@ static void NotifyLoadStatusMp4(int state, u32 loadAddr, u32 totalSize) { g_mp4RealModules[i] = id; INFO_LOG(Log::sceUtility, "Loaded the real %s", paths[i]); } - } else if (state == -1) { - g_mp4RealModules[0] = 0; - g_mp4RealModules[1] = 0; } }