summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-03-01 20:07:59 -0500
committerMorph <39850852+Morph1984@users.noreply.github.com>2023-03-05 02:36:31 -0500
commit7e353082ac79bef59d48602f9196cf804d3dfc4f (patch)
tree78e010e8e0217e29f748686c1f99e79133d49a4b /src/yuzu_cmd
parent7fffdf83b70ec5f0ead804cb2c16b9029f7e0cfa (diff)
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.cpp4
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 @@
#include <windows.h>
#include <shellapi.h>
+
+#include "common/windows/timer_resolution.h"
#endif
#undef _UNICODE
@@ -314,6 +316,8 @@ int main(int argc, char** argv) {
#ifdef _WIN32
LocalFree(argv_w);
+
+ Common::Windows::SetCurrentTimerResolutionToMaximum();
#endif
MicroProfileOnThreadCreate("EmuThread");