diff options
| author | 2022-06-30 12:38:50 +0200 | |
|---|---|---|
| committer | 2022-06-30 12:38:50 +0200 | |
| commit | 603952bc27aca2e17d39def7710d9af36791f15c (patch) | |
| tree | 8b6b2f943bbf2fc749dbe144eee26cd144c084c9 /src/common/x64/native_clock.cpp | |
| parent | Merge pull request #8518 from yuzu-emu/revert-8379-amd-push-desc-workaround (diff) | |
| parent | Adress Feedback. (diff) | |
| download | yuzu-603952bc27aca2e17d39def7710d9af36791f15c.tar.gz yuzu-603952bc27aca2e17d39def7710d9af36791f15c.tar.xz yuzu-603952bc27aca2e17d39def7710d9af36791f15c.zip | |
Merge pull request #7454 from FernandoS27/new-core-timing
Core: Remake Core Timing
Diffstat (limited to '')
| -rw-r--r-- | src/common/x64/native_clock.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp index 1b7194503..6aaa8cdf9 100644 --- a/src/common/x64/native_clock.cpp +++ b/src/common/x64/native_clock.cpp | |||
| @@ -75,8 +75,8 @@ NativeClock::NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequen | |||
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | u64 NativeClock::GetRTSC() { | 77 | u64 NativeClock::GetRTSC() { |
| 78 | TimePoint new_time_point{}; | ||
| 79 | TimePoint current_time_point{}; | 78 | TimePoint current_time_point{}; |
| 79 | TimePoint new_time_point{}; | ||
| 80 | 80 | ||
| 81 | current_time_point.pack = Common::AtomicLoad128(time_point.pack.data()); | 81 | current_time_point.pack = Common::AtomicLoad128(time_point.pack.data()); |
| 82 | do { | 82 | do { |
| @@ -89,8 +89,7 @@ u64 NativeClock::GetRTSC() { | |||
| 89 | new_time_point.inner.accumulated_ticks = current_time_point.inner.accumulated_ticks + diff; | 89 | new_time_point.inner.accumulated_ticks = current_time_point.inner.accumulated_ticks + diff; |
| 90 | } while (!Common::AtomicCompareAndSwap(time_point.pack.data(), new_time_point.pack, | 90 | } while (!Common::AtomicCompareAndSwap(time_point.pack.data(), new_time_point.pack, |
| 91 | current_time_point.pack, current_time_point.pack)); | 91 | current_time_point.pack, current_time_point.pack)); |
| 92 | /// The clock cannot be more precise than the guest timer, remove the lower bits | 92 | return new_time_point.inner.accumulated_ticks; |
| 93 | return new_time_point.inner.accumulated_ticks & inaccuracy_mask; | ||
| 94 | } | 93 | } |
| 95 | 94 | ||
| 96 | void NativeClock::Pause(bool is_paused) { | 95 | void NativeClock::Pause(bool is_paused) { |