From 1a18bf58acfc2e32c139c2b1e7440af2fd442ee3 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 9 Jul 2025 17:07:33 +0600 Subject: [PATCH] Make emulator thread time critical if possible on Windows to reduce fluctuations --- src/qt/qt_main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index 1a1f71acb..d02ed6b67 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -437,6 +437,9 @@ main_thread_fn() int frames; QThread::currentThread()->setPriority(QThread::HighestPriority); +#ifdef _WIN32 + SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); +#endif plat_set_thread_name(nullptr, "main_thread_fn"); framecountx = 0; // title_update = 1;