diff options
| author | 2023-06-21 21:12:46 -0700 | |
|---|---|---|
| committer | 2023-06-21 21:12:46 -0700 | |
| commit | e3122c5b468fd59b7eded5a3a7300643d05616bc (patch) | |
| tree | 3fe4c2c0bea83f3bb8849ef8839b9520873d41c2 /src/common/x64/cpu_detect.cpp | |
| parent | Merge pull request #10777 from liamwhite/no-barrier (diff) | |
| parent | nvdisp: Fix SingleCore frametime reporting (diff) | |
| download | yuzu-e3122c5b468fd59b7eded5a3a7300643d05616bc.tar.gz yuzu-e3122c5b468fd59b7eded5a3a7300643d05616bc.tar.xz yuzu-e3122c5b468fd59b7eded5a3a7300643d05616bc.zip | |
Merge pull request #10086 from Morph1984/coretiming-ng-1
core_timing: Use CNTPCT as the guest CPU tick
Diffstat (limited to '')
| -rw-r--r-- | src/common/x64/cpu_detect.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index 72ed6e96c..c998b1197 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include "common/common_types.h" | 14 | #include "common/common_types.h" |
| 15 | #include "common/logging/log.h" | 15 | #include "common/logging/log.h" |
| 16 | #include "common/x64/cpu_detect.h" | 16 | #include "common/x64/cpu_detect.h" |
| 17 | #include "common/x64/rdtsc.h" | ||
| 17 | 18 | ||
| 18 | #ifdef _WIN32 | 19 | #ifdef _WIN32 |
| 19 | #include <windows.h> | 20 | #include <windows.h> |
| @@ -187,6 +188,8 @@ static CPUCaps Detect() { | |||
| 187 | caps.tsc_frequency = static_cast<u64>(caps.crystal_frequency) * | 188 | caps.tsc_frequency = static_cast<u64>(caps.crystal_frequency) * |
| 188 | caps.tsc_crystal_ratio_numerator / | 189 | caps.tsc_crystal_ratio_numerator / |
| 189 | caps.tsc_crystal_ratio_denominator; | 190 | caps.tsc_crystal_ratio_denominator; |
| 191 | } else { | ||
| 192 | caps.tsc_frequency = X64::EstimateRDTSCFrequency(); | ||
| 190 | } | 193 | } |
| 191 | } | 194 | } |
| 192 | 195 | ||