From: Kai Krakow Subject: [PATCH v2 2/2] dinput: Raise priority of device threads. Message-Id: <20181210224555.24125-2-kai@kaishome.de> Date: Mon, 10 Dec 2018 23:45:55 +0100 In-Reply-To: <20181210224555.24125-1-kai@kaishome.de> References: <20181210224555.24125-1-kai@kaishome.de> This potentially reduces lag and makes the input device initialization faster under CPU load. Signed-off-by: Kai Krakow --- dlls/dinput/dinput_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 6ed764e7485..d11ac249178 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -1817,6 +1817,8 @@ static BOOL check_hook_thread(void) { DWORD tid = hook_thread_id; + SetThreadPriority(hook_thread, THREAD_PRIORITY_TIME_CRITICAL); + hook_thread_id = 0; PostThreadMessageW(tid, WM_USER+0x10, 0, 0); LeaveCriticalSection(&dinput_hook_crit); -- 2.19.2