diff options
author | Lioncash <mathew1800@gmail.com> | 2019-11-26 22:29:34 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-11-27 03:55:39 +0100 |
commit | b05bfc603689419dc515a656b9fc711d79994f13 (patch) | |
tree | bc0937d11bbe31458785a69478edbf11a720b0ae /src/core/memory | |
parent | core/memory: Migrate over ZeroBlock() and CopyBlock() to the Memory class (diff) | |
download | yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.gz yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.bz2 yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.lz yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.xz yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.zst yuzu-b05bfc603689419dc515a656b9fc711d79994f13.zip |
Diffstat (limited to 'src/core/memory')
-rw-r--r-- | src/core/memory/cheat_engine.cpp | 5 | ||||
-rw-r--r-- | src/core/memory/cheat_engine.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index b73cc9fbd..d6745af8b 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -20,14 +20,13 @@ namespace Memory { constexpr s64 CHEAT_ENGINE_TICKS = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 12); constexpr u32 KEYPAD_BITMASK = 0x3FFFFFF; -StandardVmCallbacks::StandardVmCallbacks(const Core::System& system, - const CheatProcessMetadata& metadata) +StandardVmCallbacks::StandardVmCallbacks(Core::System& system, const CheatProcessMetadata& metadata) : metadata(metadata), system(system) {} StandardVmCallbacks::~StandardVmCallbacks() = default; void StandardVmCallbacks::MemoryRead(VAddr address, void* data, u64 size) { - ReadBlock(SanitizeAddress(address), data, size); + system.Memory().ReadBlock(SanitizeAddress(address), data, size); } void StandardVmCallbacks::MemoryWrite(VAddr address, const void* data, u64 size) { diff --git a/src/core/memory/cheat_engine.h b/src/core/memory/cheat_engine.h index e3db90dac..3d6b2298a 100644 --- a/src/core/memory/cheat_engine.h +++ b/src/core/memory/cheat_engine.h @@ -24,7 +24,7 @@ namespace Memory { class StandardVmCallbacks : public DmntCheatVm::Callbacks { public: - StandardVmCallbacks(const Core::System& system, const CheatProcessMetadata& metadata); + StandardVmCallbacks(Core::System& system, const CheatProcessMetadata& metadata); ~StandardVmCallbacks() override; void MemoryRead(VAddr address, void* data, u64 size) override; @@ -37,7 +37,7 @@ private: VAddr SanitizeAddress(VAddr address) const; const CheatProcessMetadata& metadata; - const Core::System& system; + Core::System& system; }; // Intermediary class that parses a text file or other disk format for storing cheats into a |