diff options
| author | 2023-03-01 20:07:59 -0500 | |
|---|---|---|
| committer | 2023-03-05 02:36:31 -0500 | |
| commit | 7e353082ac79bef59d48602f9196cf804d3dfc4f (patch) | |
| tree | 78e010e8e0217e29f748686c1f99e79133d49a4b /src/yuzu_cmd | |
| parent | wall_clock: Make use of SteadyClock (diff) | |
| download | yuzu-7e353082ac79bef59d48602f9196cf804d3dfc4f.tar.gz yuzu-7e353082ac79bef59d48602f9196cf804d3dfc4f.tar.xz yuzu-7e353082ac79bef59d48602f9196cf804d3dfc4f.zip | |
main: (Windows) Set the current timer resolution to the maximum
Increases the precision of thread sleeps on Windows.
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 77edd58ca..5f39ece32 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -42,6 +42,8 @@ | |||
| 42 | #include <windows.h> | 42 | #include <windows.h> |
| 43 | 43 | ||
| 44 | #include <shellapi.h> | 44 | #include <shellapi.h> |
| 45 | |||
| 46 | #include "common/windows/timer_resolution.h" | ||
| 45 | #endif | 47 | #endif |
| 46 | 48 | ||
| 47 | #undef _UNICODE | 49 | #undef _UNICODE |
| @@ -314,6 +316,8 @@ int main(int argc, char** argv) { | |||
| 314 | 316 | ||
| 315 | #ifdef _WIN32 | 317 | #ifdef _WIN32 |
| 316 | LocalFree(argv_w); | 318 | LocalFree(argv_w); |
| 319 | |||
| 320 | Common::Windows::SetCurrentTimerResolutionToMaximum(); | ||
| 317 | #endif | 321 | #endif |
| 318 | 322 | ||
| 319 | MicroProfileOnThreadCreate("EmuThread"); | 323 | MicroProfileOnThreadCreate("EmuThread"); |