From 5638735af60ed547e6fa1d71dbaeacec7f947a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A5IGA?= <164882787+Xphalnos@users.noreply.github.com> Date: Fri, 20 Sep 2024 06:54:30 +0200 Subject: [PATCH] Set High Priority for Windows (#961) --- src/emulator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emulator.cpp b/src/emulator.cpp index 2d3460a7..bf2d4588 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -42,9 +42,10 @@ Emulator::Emulator() { const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); Config::load(config_dir / "config.toml"); - // Initialize NT API functions + // Initialize NT API functions and set high priority #ifdef _WIN32 Common::NtApi::Initialize(); + SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS); #endif // Start logger.