From 2dd552a54a0f0418d1b3af9e2df65b388751a7f8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 7 Jun 2004 02:40:09 +0000 Subject: [PATCH] make sure pri boosting is enabled for di/pump threads --- stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp | 3 +++ stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp b/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp index 09f6dc018e..c63d6b94ce 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -443,6 +443,9 @@ void InputHandler_DInput::InputThreadMain() if(!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST)) LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set DirectInput thread priority")); + /* Enable priority boosting. */ + SetThreadPriorityBoost( GetCurrentThread(), FALSE ); + unsigned i; vector BufferedDevices, UnbufferedDevices; HANDLE Handle = CreateEvent(NULL, FALSE, FALSE, NULL); diff --git a/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp b/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp index a38930b3ab..06ee22b1fc 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp @@ -90,6 +90,9 @@ void InputHandler_Win32_Pump::InputThreadMain() if(!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST)) LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set Pump thread priority")); + /* Enable priority boosting. */ + SetThreadPriorityBoost( GetCurrentThread(), FALSE ); + vector sources; int i; for(i = 0; i < NUM_PUMPS; ++i)