diff options
author | german77 <[email protected]> | 2022-01-27 16:53:58 -0600 |
---|---|---|
committer | german77 <[email protected]> | 2022-01-27 17:07:52 -0600 |
commit | e4c63d432de1805a97a6586e6610cf35f3b11889 (patch) | |
tree | 497131bd072b2fe73df40703b02c057c4619d705 /src/common/wall_clock.cpp | |
parent | 2136ebccd65a27bc4aa64e5f9174abd994247641 (diff) | |
download | yuzu-mainline-e4c63d432de1805a97a6586e6610cf35f3b11889.tar.gz yuzu-mainline-e4c63d432de1805a97a6586e6610cf35f3b11889.zip |
wall_clock: use standard wall clock if rtsc frequency is too low
Diffstat (limited to 'src/common/wall_clock.cpp')
-rw-r--r-- | src/common/wall_clock.cpp | 4 |
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 { |