Rebase against f65cfbfe9b20e38537c7cb8608e7f411c9e8b725

This commit is contained in:
Alistair Leslie-Hughes
2020-04-22 08:16:06 +10:00
parent 0d8d1f0447
commit 4e0031b058
11 changed files with 35 additions and 519 deletions

View File

@@ -1,4 +1,4 @@
From 8217791e4b68de86e713dee0ecdd3c5ccd029017 Mon Sep 17 00:00:00 2001
From c2f13f4d65b25a10b2e9dc8a156dbf6adc6e8263 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 26 Aug 2019 16:06:59 +0200
Subject: [PATCH] dinput8: Add support for dinput devices that use raw input
@@ -30,7 +30,7 @@ index 423e8f77792..b0fb181fc6d 100644
int queue_len; /* valid size of the queue */
int queue_head; /* position to write new event into queue */
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index 4d2d4afe106..9e3b9f48250 100644
index ee5af1b8ce3..79b275af89b 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -98,6 +98,10 @@ static const struct dinput_device *dinput_devices[] =
@@ -123,7 +123,7 @@ index 4d2d4afe106..9e3b9f48250 100644
/* Force creation of the message queue */
PeekMessageW( &msg, 0, 0, 0, PM_NOREMOVE );
SetEvent(param);
@@ -1812,6 +1872,9 @@ static DWORD WINAPI hook_thread_proc(void *param)
@@ -1816,6 +1876,9 @@ static DWORD WINAPI hook_thread_proc(void *param)
DispatchMessageW(&msg);
}
@@ -133,7 +133,7 @@ index 4d2d4afe106..9e3b9f48250 100644
FreeLibraryAndExitThread(DINPUT_instance, 0);
}
@@ -1893,6 +1956,23 @@ void check_dinput_hooks(LPDIRECTINPUTDEVICE8W iface, BOOL acquired)
@@ -1898,6 +1961,23 @@ void check_dinput_hooks(LPDIRECTINPUTDEVICE8W iface, BOOL acquired)
hook_thread_event = NULL;
}
@@ -154,10 +154,10 @@ index 4d2d4afe106..9e3b9f48250 100644
+ WARN( "Unable to (un)register raw device %x:%x\n", dev->raw_device.usUsagePage, dev->raw_device.usUsage );
+ }
+
PostThreadMessageW( hook_thread_id, WM_USER+0x10, 1, 0 );
LeaveCriticalSection(&dinput_hook_crit);
@@ -1919,9 +1999,11 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved)
if (acquired)
hook_change_finished_event = CreateEventW( NULL, FALSE, FALSE, NULL );
PostThreadMessageW( hook_thread_id, WM_USER+0x10, 1, (LPARAM)hook_change_finished_event );
@@ -1932,9 +2012,11 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved)
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(inst);
DINPUT_instance = inst;
@@ -170,5 +170,5 @@ index 4d2d4afe106..9e3b9f48250 100644
break;
}
--
2.24.1
2.26.1