summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar german772022-01-27 16:53:58 -0600
committerGravatar german772022-01-27 17:07:52 -0600
commite4c63d432de1805a97a6586e6610cf35f3b11889 (patch)
tree497131bd072b2fe73df40703b02c057c4619d705 /src
parentMerge pull request #7761 from v1993/patch-8 (diff)
downloadyuzu-e4c63d432de1805a97a6586e6610cf35f3b11889.tar.gz
yuzu-e4c63d432de1805a97a6586e6610cf35f3b11889.tar.xz
yuzu-e4c63d432de1805a97a6586e6610cf35f3b11889.zip
wall_clock: use standard wall clock if rtsc frequency is too low
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,
72 if (caps.invariant_tsc) { 72 if (caps.invariant_tsc) {
73 rtsc_frequency = EstimateRDTSCFrequency(); 73 rtsc_frequency = EstimateRDTSCFrequency();
74 } 74 }
75 if (rtsc_frequency == 0) { 75
76 // Fallback to StandardWallClock if rtsc period is higher than a nano second
77 if (rtsc_frequency <= 1000000000) {
76 return std::make_unique<StandardWallClock>(emulated_cpu_frequency, 78 return std::make_unique<StandardWallClock>(emulated_cpu_frequency,
77 emulated_clock_frequency); 79 emulated_clock_frequency);
78 } else { 80 } else {