diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-04 01:04:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 01:04:28 +0200 |
commit | df51eb9bdec5be189e0662ab81bc29277f3da343 (patch) | |
tree | dc1a5cf937fe77ccabb8dab97b5e9a5af9758c27 /src/core/arm | |
parent | Merge pull request #6275 from german77/mousefocus (diff) | |
parent | core: Resolve misc cases of variable shadowing (diff) | |
download | yuzu-df51eb9bdec5be189e0662ab81bc29277f3da343.tar yuzu-df51eb9bdec5be189e0662ab81bc29277f3da343.tar.gz yuzu-df51eb9bdec5be189e0662ab81bc29277f3da343.tar.bz2 yuzu-df51eb9bdec5be189e0662ab81bc29277f3da343.tar.lz yuzu-df51eb9bdec5be189e0662ab81bc29277f3da343.tar.xz yuzu-df51eb9bdec5be189e0662ab81bc29277f3da343.tar.zst yuzu-df51eb9bdec5be189e0662ab81bc29277f3da343.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_cp15.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp index caefc09f4..ebd506121 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp @@ -94,12 +94,11 @@ CallbackOrAccessOneWord DynarmicCP15::CompileGetOneWord(bool two, unsigned opc1, CallbackOrAccessTwoWords DynarmicCP15::CompileGetTwoWords(bool two, unsigned opc, CoprocReg CRm) { if (!two && opc == 0 && CRm == CoprocReg::C14) { // CNTPCT - const auto callback = static_cast<u64 (*)(Dynarmic::A32::Jit*, void*, u32, u32)>( - [](Dynarmic::A32::Jit*, void* arg, u32, u32) -> u64 { - ARM_Dynarmic_32& parent = *(ARM_Dynarmic_32*)arg; - return parent.system.CoreTiming().GetClockTicks(); - }); - return Dynarmic::A32::Coprocessor::Callback{callback, (void*)&parent}; + const auto callback = [](Dynarmic::A32::Jit*, void* arg, u32, u32) -> u64 { + const auto& parent_arg = *static_cast<ARM_Dynarmic_32*>(arg); + return parent_arg.system.CoreTiming().GetClockTicks(); + }; + return Callback{callback, &parent}; } LOG_CRITICAL(Core_ARM, "CP15: mrrc{} p15, {}, <Rt>, <Rt2>, {}", two ? "2" : "", opc, CRm); |