From 9858ea79fb9e2cfef75fe0e5239c2daa23b923b2 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Tue, 6 Feb 2024 13:44:39 -0600 Subject: dmnt: cheat: Invalidate cache on memory writes --- src/core/memory/cheat_engine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index 14d1a3840..470521f44 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -5,6 +5,7 @@ #include "common/hex_util.h" #include "common/microprofile.h" #include "common/swap.h" +#include "core/arm/debug.h" #include "core/core.h" #include "core/core_timing.h" #include "core/hle/kernel/k_page_table.h" @@ -63,7 +64,9 @@ void StandardVmCallbacks::MemoryWriteUnsafe(VAddr address, const void* data, u64 return; } - system.ApplicationMemory().WriteBlock(address, data, size); + if (system.ApplicationMemory().WriteBlock(address, data, size)) { + Core::InvalidateInstructionCacheRange(system.ApplicationProcess(), address, size); + } } u64 StandardVmCallbacks::HidKeysDown() { -- cgit v1.2.3