summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-01-29 02:04:24 +0100
committerGitHub <noreply@github.com>2022-01-29 02:04:24 +0100
commit11099dda2e2ab67ba4861d1e927afaa2ccce1efa (patch)
treed89af13af3a1538f9fe676cdf58a3baec7a22fb0 /src
parentMerge pull request #7800 from ameerj/spirv-int64-storage (diff)
parentwall_clock: use standard wall clock if rtsc frequency is too low (diff)
downloadyuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.tar
yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.tar.gz
yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.tar.bz2
yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.tar.lz
yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.tar.xz
yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.tar.zst
yuzu-11099dda2e2ab67ba4861d1e927afaa2ccce1efa.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/wall_clock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp
index 49830b8ab..ffa282e88 100644
--- a/src/common/wall_clock.cpp
+++ b/src/common/wall_clock.cpp
@@ -72,7 +72,9 @@ std::unique_ptr<WallClock> CreateBestMatchingClock(u32 emulated_cpu_frequency,
if (caps.invariant_tsc) {
rtsc_frequency = EstimateRDTSCFrequency();
}
- if (rtsc_frequency == 0) {
+
+ // Fallback to StandardWallClock if rtsc period is higher than a nano second
+ if (rtsc_frequency <= 1000000000) {
return std::make_unique<StandardWallClock>(emulated_cpu_frequency,
emulated_clock_frequency);
} else {