summaryrefslogtreecommitdiffstats
path: root/src/common/wall_clock.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-07-17 08:14:38 +0200
committerGitHub <noreply@github.com>2022-07-17 08:14:38 +0200
commit8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a (patch)
tree10fc191d058f7d057cbe41bc875054080774893d /src/common/wall_clock.cpp
parentMerge pull request #8593 from merryhime/ranged-setting-T (diff)
parentguard against div-by-zero (diff)
downloadyuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.tar
yuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.tar.gz
yuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.tar.bz2
yuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.tar.lz
yuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.tar.xz
yuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.tar.zst
yuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.zip
Diffstat (limited to 'src/common/wall_clock.cpp')
-rw-r--r--src/common/wall_clock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp
index b4fb3a59f..ae07f2811 100644
--- a/src/common/wall_clock.cpp
+++ b/src/common/wall_clock.cpp
@@ -67,7 +67,7 @@ std::unique_ptr<WallClock> CreateBestMatchingClock(u64 emulated_cpu_frequency,
const auto& caps = GetCPUCaps();
u64 rtsc_frequency = 0;
if (caps.invariant_tsc) {
- rtsc_frequency = EstimateRDTSCFrequency();
+ rtsc_frequency = caps.tsc_frequency ? caps.tsc_frequency : EstimateRDTSCFrequency();
}
// Fallback to StandardWallClock if the hardware TSC does not have the precision greater than: