diff options
author | Lioncash <mathew1800@gmail.com> | 2020-04-15 21:59:23 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-04-16 03:33:46 +0200 |
commit | 1c340c6efad903580904297730d708ce8b947eb6 (patch) | |
tree | a79ad11775373ecf31912a7a50fcfbcc08d6e8b3 /src/core/memory | |
parent | Merge pull request #3612 from ReinUsesLisp/red (diff) | |
download | yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.gz yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.bz2 yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.lz yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.xz yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.zst yuzu-1c340c6efad903580904297730d708ce8b947eb6.zip |
Diffstat (limited to 'src/core/memory')
-rw-r--r-- | src/core/memory/dmnt_cheat_vm.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/memory/dmnt_cheat_vm.cpp b/src/core/memory/dmnt_cheat_vm.cpp index 4f4fa5099..5bb26a36f 100644 --- a/src/core/memory/dmnt_cheat_vm.cpp +++ b/src/core/memory/dmnt_cheat_vm.cpp @@ -55,7 +55,7 @@ void DmntCheatVm::LogOpcode(const CheatVmOpcode& opcode) { fmt::format("Cond Type: {:X}", static_cast<u32>(begin_cond->cond_type))); callbacks->CommandLog(fmt::format("Rel Addr: {:X}", begin_cond->rel_address)); callbacks->CommandLog(fmt::format("Value: {:X}", begin_cond->value.bit64)); - } else if (auto end_cond = std::get_if<EndConditionalOpcode>(&opcode.opcode)) { + } else if (std::holds_alternative<EndConditionalOpcode>(opcode.opcode)) { callbacks->CommandLog("Opcode: End Conditional"); } else if (auto ctrl_loop = std::get_if<ControlLoopOpcode>(&opcode.opcode)) { if (ctrl_loop->start_loop) { @@ -399,6 +399,7 @@ bool DmntCheatVm::DecodeNextOpcode(CheatVmOpcode& out) { // 8kkkkkkk // Just parse the mask. begin_keypress_cond.key_mask = first_dword & 0x0FFFFFFF; + opcode.opcode = begin_keypress_cond; } break; case CheatVmOpcodeType::PerformArithmeticRegister: { PerformArithmeticRegisterOpcode perform_math_reg{}; @@ -779,7 +780,7 @@ void DmntCheatVm::Execute(const CheatProcessMetadata& metadata) { if (!cond_met) { SkipConditionalBlock(); } - } else if (auto end_cond = std::get_if<EndConditionalOpcode>(&cur_opcode.opcode)) { + } else if (std::holds_alternative<EndConditionalOpcode>(cur_opcode.opcode)) { // Decrement the condition depth. // We will assume, graciously, that mismatched conditional block ends are a nop. if (condition_depth > 0) { |