make sure pri boosting is enabled for di/pump threads

This commit is contained in:
Glenn Maynard
2004-06-07 02:40:09 +00:00
parent d72e41227f
commit 2dd552a54a
2 changed files with 6 additions and 0 deletions
@@ -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<DIDevice*> BufferedDevices, UnbufferedDevices;
HANDLE Handle = CreateEvent(NULL, FALSE, FALSE, NULL);
@@ -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<WindowsFileIO *> sources;
int i;
for(i = 0; i < NUM_PUMPS; ++i)