diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-24 10:47:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-24 10:47:42 +0100 |
commit | 46945b5c962e680d8fe963bbff9663f44c2a3ab2 (patch) | |
tree | c395ba2775c49754ef05222d2bb097131412d0d6 | |
parent | Merge pull request #274 from Subv/viewport_regs (diff) | |
parent | arm_dynarmic: Fix timing (diff) | |
download | yuzu-46945b5c962e680d8fe963bbff9663f44c2a3ab2.tar yuzu-46945b5c962e680d8fe963bbff9663f44c2a3ab2.tar.gz yuzu-46945b5c962e680d8fe963bbff9663f44c2a3ab2.tar.bz2 yuzu-46945b5c962e680d8fe963bbff9663f44c2a3ab2.tar.lz yuzu-46945b5c962e680d8fe963bbff9663f44c2a3ab2.tar.xz yuzu-46945b5c962e680d8fe963bbff9663f44c2a3ab2.tar.zst yuzu-46945b5c962e680d8fe963bbff9663f44c2a3ab2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 7d83f9717..6afad0e0c 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -86,21 +86,17 @@ public: } void AddTicks(u64 ticks) override { - if (ticks > ticks_remaining) { - ticks_remaining = 0; - return; - } - ticks -= ticks_remaining; + CoreTiming::AddTicks(ticks - num_interpreted_instructions); + num_interpreted_instructions = 0; } u64 GetTicksRemaining() override { - return ticks_remaining; + return std::max(CoreTiming::GetDowncount(), 0); } u64 GetCNTPCT() override { return CoreTiming::GetTicks(); } ARM_Dynarmic& parent; - size_t ticks_remaining = 0; size_t num_interpreted_instructions = 0; u64 tpidrro_el0 = 0; u64 tpidr_el0 = 0; |