[PATCH v2 2/2] dinput: Raise priority of device threads.

Kai Krakow kai at kaishome.de
Mon Dec 10 16:45:55 CST 2018


This potentially reduces lag and makes the input device initialization
faster under CPU load.

Signed-off-by: Kai Krakow <kai at 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);
-- 
2.19.2




More information about the wine-devel mailing list