From c297f73f690dc083b286061d89808993406cb2de Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Tue, 27 Aug 2024 00:14:38 -0700 Subject: [PATCH] Revert "Run as "High Priority" on Windows" Revert "Run as "High Priority" on Windows" This reverts commit 3f8a7f5fd389cd3e8f923229bf46df278cdbf5cf. --- src/arch/ArchHooks/ArchHooks_Win32.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/arch/ArchHooks/ArchHooks_Win32.cpp b/src/arch/ArchHooks/ArchHooks_Win32.cpp index 4abc1213a1..56a5e9bafb 100644 --- a/src/arch/ArchHooks/ArchHooks_Win32.cpp +++ b/src/arch/ArchHooks/ArchHooks_Win32.cpp @@ -150,13 +150,20 @@ void ArchHooks_Win32::SetTime( tm newtime ) void ArchHooks_Win32::BoostPriority() { - // Be sure to boost the app, not the thread, to make sure the sound thread stays higher priority than the main thread. - SetPriorityClass( GetCurrentProcess(), HIGH_PRIORITY_CLASS ); + // We just want a slight boost, so we don't skip needlessly if something happens + // in the background. We don't really want to be high-priority—above normal should be enough. + // + // Be sure to boost the app, not the thread, to make sure the + // sound thread stays higher priority than the main thread. + // + // Also note that high priority won't prevent the game from being interrupted by Windows + // notifications - that needs to be handled within ArchUtils. + SetPriorityClass( GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS ); } void ArchHooks_Win32::UnBoostPriority() { - SetPriorityClass( GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS ); + SetPriorityClass( GetCurrentProcess(), NORMAL_PRIORITY_CLASS ); } void ArchHooks_Win32::SetupConcurrentRenderingThread()