diff options
| author | 2023-03-01 19:27:10 -0500 | |
|---|---|---|
| committer | 2023-03-05 01:41:28 -0500 | |
| commit | 1ed49f92dd56289e6e31a967e602c65ccedd4ff1 (patch) | |
| tree | a151df116022445b7606614e31e9b3a3b8225152 /src/common/CMakeLists.txt | |
| parent | common: Implement a high resolution steady clock (diff) | |
| download | yuzu-1ed49f92dd56289e6e31a967e602c65ccedd4ff1.tar.gz yuzu-1ed49f92dd56289e6e31a967e602c65ccedd4ff1.tar.xz yuzu-1ed49f92dd56289e6e31a967e602c65ccedd4ff1.zip | |
common: Implement a method to change the Windows timer resolution
This utilizes undocumented NtDll functions to change the current timer resolution from the default of 1ms.
Diffstat (limited to 'src/common/CMakeLists.txt')
| -rw-r--r-- | src/common/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 9f5d4c265..58ff5f2f3 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -144,6 +144,14 @@ add_library(common STATIC | |||
| 144 | zstd_compression.h | 144 | zstd_compression.h |
| 145 | ) | 145 | ) |
| 146 | 146 | ||
| 147 | if (WIN32) | ||
| 148 | target_sources(common PRIVATE | ||
| 149 | windows/timer_resolution.cpp | ||
| 150 | windows/timer_resolution.h | ||
| 151 | ) | ||
| 152 | target_link_libraries(common PRIVATE ntdll) | ||
| 153 | endif() | ||
| 154 | |||
| 147 | if(ARCHITECTURE_x86_64) | 155 | if(ARCHITECTURE_x86_64) |
| 148 | target_sources(common | 156 | target_sources(common |
| 149 | PRIVATE | 157 | PRIVATE |