Set High Priority for Windows (#961)
Some checks are pending
Reuse / reuse (push) Waiting to run
Clang Format / clang-format (push) Waiting to run
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run

This commit is contained in:
¥IGA 2024-09-20 06:54:30 +02:00 committed by GitHub
parent 048b8aef58
commit 5638735af6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.