InvalidationTracker: Disable mono hacks when multiblock is disabled

This commit is contained in:
Billy Laws committed 2025-08-07 21:27:04 +01:00
1 parent a47c947065
commit dd2845401c
1 file changed
+11 -4
+11 -4
View File
@@ -87,10 +87,17 @@ void InvalidationTracker::HandleImageMap(std::string_view Name, uint64_t Address
FEX_CONFIG_OPT(MonoHacks, MONOHACKS);
if (MonoHacks && (Name == "mono-2.0-bdwgc.dll" || Name == "mono.dll")) {
CTX.MarkMonoDetected();
MonoBackpatcherDetectionPending = true;
MonoBase = Address;
MonoEnd = LastExecutableSectionEnd;
FEX_CONFIG_OPT(MaxInst, MAXINST);
FEX_CONFIG_OPT(Multiblock, MULTIBLOCK);
if (Multiblock && MaxInst() >= 500) {
// Require these settings to ensure we can safely hook all SMC sites in a single block
CTX.MarkMonoDetected();
MonoBackpatcherDetectionPending = true;
MonoBase = Address;
MonoEnd = LastExecutableSectionEnd;
} else {
LogMan::Msg::IFmt("Not applying mono hacks, Multiblock with MaxInst >= 500 required");
}
}
}