diff options
Diffstat (limited to 'src/core/memory')
-rw-r--r-- | src/core/memory/cheat_engine.cpp | 7 | ||||
-rw-r--r-- | src/core/memory/dmnt_cheat_vm.cpp | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index b56cb0627..10821d452 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -22,7 +22,7 @@ constexpr u32 KEYPAD_BITMASK = 0x3FFFFFF; StandardVmCallbacks::StandardVmCallbacks(const Core::System& system, const CheatProcessMetadata& metadata) - : system(system), metadata(metadata) {} + : metadata(metadata), system(system) {} StandardVmCallbacks::~StandardVmCallbacks() = default; @@ -176,9 +176,8 @@ std::vector<CheatEntry> TextCheatParser::Parse(const Core::System& system, CheatEngine::CheatEngine(Core::System& system, std::vector<CheatEntry> cheats, const std::array<u8, 0x20>& build_id) - : system{system}, core_timing{system.CoreTiming()}, vm{std::make_unique<StandardVmCallbacks>( - system, metadata)}, - cheats(std::move(cheats)) { + : vm{std::make_unique<StandardVmCallbacks>(system, metadata)}, + cheats(std::move(cheats)), core_timing{system.CoreTiming()}, system{system} { metadata.main_nso_build_id = build_id; } diff --git a/src/core/memory/dmnt_cheat_vm.cpp b/src/core/memory/dmnt_cheat_vm.cpp index cc16d15a4..4f4fa5099 100644 --- a/src/core/memory/dmnt_cheat_vm.cpp +++ b/src/core/memory/dmnt_cheat_vm.cpp @@ -1133,8 +1133,8 @@ void DmntCheatVm::Execute(const CheatProcessMetadata& metadata) { case SaveRestoreRegisterOpType::ClearRegs: case SaveRestoreRegisterOpType::Restore: default: - src = registers.data(); - dst = saved_values.data(); + src = saved_values.data(); + dst = registers.data(); break; } for (std::size_t i = 0; i < NumRegisters; i++) { |