This potentially reduces lag and makes the input device initialization faster under CPU load.
Signed-off-by: Kai Krakow kai@kaishome.de --- 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);