make sure pri boosting is enabled for di/pump threads
This commit is contained in:
@@ -443,6 +443,9 @@ void InputHandler_DInput::InputThreadMain()
|
|||||||
if(!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST))
|
if(!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST))
|
||||||
LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set DirectInput thread priority"));
|
LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set DirectInput thread priority"));
|
||||||
|
|
||||||
|
/* Enable priority boosting. */
|
||||||
|
SetThreadPriorityBoost( GetCurrentThread(), FALSE );
|
||||||
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
vector<DIDevice*> BufferedDevices, UnbufferedDevices;
|
vector<DIDevice*> BufferedDevices, UnbufferedDevices;
|
||||||
HANDLE Handle = CreateEvent(NULL, FALSE, FALSE, NULL);
|
HANDLE Handle = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
|
|||||||
@@ -90,6 +90,9 @@ void InputHandler_Win32_Pump::InputThreadMain()
|
|||||||
if(!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST))
|
if(!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST))
|
||||||
LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set Pump thread priority"));
|
LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set Pump thread priority"));
|
||||||
|
|
||||||
|
/* Enable priority boosting. */
|
||||||
|
SetThreadPriorityBoost( GetCurrentThread(), FALSE );
|
||||||
|
|
||||||
vector<WindowsFileIO *> sources;
|
vector<WindowsFileIO *> sources;
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < NUM_PUMPS; ++i)
|
for(i = 0; i < NUM_PUMPS; ++i)
|
||||||
|
|||||||
Reference in New Issue
Block a user