aboutsummaryrefslogtreecommitdiff
path: root/src/core/memory/cheat_engine.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-07 15:33:44 -0500
committerGitHub <noreply@github.com>2024-02-07 15:33:44 -0500
commit81b1330de9a0009035b657b6025570d0d1efcca6 (patch)
tree3de15bc47189fe816ff2a9b6dd0f7788ec67d0e9 /src/core/memory/cheat_engine.cpp
parent0b161753e42c4a566206573edbc53c5562ccba68 (diff)
parentf07a3ef82c67ac418f6b031094a18c5a3993fe47 (diff)
Merge pull request #12939 from german77/wonder
dmnt: cheat: Invalidate cache on memory writes
Diffstat (limited to 'src/core/memory/cheat_engine.cpp')
-rw-r--r--src/core/memory/cheat_engine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp
index 14d1a3840f..470521f448 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() {