mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 2b0977fc711e1faadfef69e3a46c2d1848b4826b
This commit is contained in:
parent
f8c3c9a6f8
commit
c4c72e90ab
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "2b0977fc711e1faadfef69e3a46c2d1848b4826b"
|
||||
echo "4cdb7ec8291c171176fb390f4cef1f88409a982f"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,7 +1,7 @@
|
||||
From bbb38b3c009d47aced1ba746549fdc51e34cbaf4 Mon Sep 17 00:00:00 2001
|
||||
From a6c66494095012c8a867bf4ee6f44fbebf7bd69a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 12 Sep 2019 14:48:23 +0200
|
||||
Subject: [PATCH 4/5] user32: Implement WM_INPUT/RIM_TYPEHID message handling.
|
||||
Subject: [PATCH] user32: Implement WM_INPUT/RIM_TYPEHID message handling.
|
||||
|
||||
---
|
||||
dlls/user32/message.c | 19 ++++++++++++++++++-
|
||||
@ -10,7 +10,7 @@ Subject: [PATCH 4/5] user32: Implement WM_INPUT/RIM_TYPEHID message handling.
|
||||
3 files changed, 57 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
|
||||
index 55bbe409c9e..ae081cd6eb1 100644
|
||||
index 8c915629613..5e8ae1e5fb5 100644
|
||||
--- a/dlls/user32/message.c
|
||||
+++ b/dlls/user32/message.c
|
||||
@@ -2285,10 +2285,17 @@ static BOOL process_rawinput_message( MSG *msg, const struct hardware_msg_data *
|
||||
@ -50,30 +50,30 @@ index 55bbe409c9e..ae081cd6eb1 100644
|
||||
{
|
||||
FIXME("Unhandled rawinput type %#x.\n", msg_data->rawinput.type);
|
||||
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
|
||||
index 8cf9f8ebf62..72ae91cfcb5 100644
|
||||
index 0c72b3343ae..5211999e836 100644
|
||||
--- a/dlls/user32/rawinput.c
|
||||
+++ b/dlls/user32/rawinput.c
|
||||
@@ -43,6 +43,7 @@ struct hid_device
|
||||
@@ -46,6 +46,7 @@ struct device
|
||||
{
|
||||
WCHAR *path;
|
||||
HANDLE file;
|
||||
+ HANDLE handle;
|
||||
RID_DEVICE_INFO_HID info;
|
||||
RID_DEVICE_INFO info;
|
||||
PHIDP_PREPARSED_DATA data;
|
||||
};
|
||||
@@ -59,6 +60,8 @@ static CRITICAL_SECTION_DEBUG hid_devices_cs_debug =
|
||||
@@ -62,6 +63,8 @@ static CRITICAL_SECTION_DEBUG rawinput_devices_cs_debug =
|
||||
};
|
||||
static CRITICAL_SECTION hid_devices_cs = { &hid_devices_cs_debug, -1, 0, 0, 0, 0 };
|
||||
static CRITICAL_SECTION rawinput_devices_cs = { &rawinput_devices_cs_debug, -1, 0, 0, 0, 0 };
|
||||
|
||||
+extern DWORD WINAPI GetFinalPathNameByHandleW(HANDLE file, LPWSTR path, DWORD charcount, DWORD flags);
|
||||
+
|
||||
static BOOL array_reserve(void **elements, unsigned int *capacity, unsigned int count, unsigned int size)
|
||||
{
|
||||
unsigned int new_capacity, max_capacity;
|
||||
@@ -138,10 +141,43 @@ static struct hid_device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *ifa
|
||||
device = &hid_devices[hid_devices_count++];
|
||||
@@ -143,10 +146,43 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
|
||||
device->path = path;
|
||||
device->file = file;
|
||||
device->info.cbSize = sizeof(RID_DEVICE_INFO);
|
||||
+ device->handle = INVALID_HANDLE_VALUE;
|
||||
|
||||
return device;
|
||||
@ -86,10 +86,10 @@ index 8cf9f8ebf62..72ae91cfcb5 100644
|
||||
+ ULONG dummy;
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < hid_devices_count; ++i)
|
||||
+ for (i = 0; i < rawinput_devices_count; ++i)
|
||||
+ {
|
||||
+ if (hid_devices[i].handle == device)
|
||||
+ return &hid_devices[i];
|
||||
+ if (rawinput_devices[i].handle == device)
|
||||
+ return &rawinput_devices[i];
|
||||
+ }
|
||||
+
|
||||
+ if (NtQueryObject( device, ObjectNameInformation, &buffer, sizeof(buffer) - sizeof(WCHAR), &dummy ) || !info->Name.Buffer)
|
||||
@ -99,23 +99,23 @@ index 8cf9f8ebf62..72ae91cfcb5 100644
|
||||
+ if (info->Name.Length > 1 && info->Name.Buffer[0] == '\\' && info->Name.Buffer[1] == '?')
|
||||
+ info->Name.Buffer[1] = '\\';
|
||||
+
|
||||
+ for (i = 0; i < hid_devices_count; ++i)
|
||||
+ for (i = 0; i < rawinput_devices_count; ++i)
|
||||
+ {
|
||||
+ if (strcmpW(hid_devices[i].path, info->Name.Buffer) == 0)
|
||||
+ if (strcmpW(rawinput_devices[i].path, info->Name.Buffer) == 0)
|
||||
+ {
|
||||
+ hid_devices[i].handle = device;
|
||||
+ return &hid_devices[i];
|
||||
+ rawinput_devices[i].handle = device;
|
||||
+ return &rawinput_devices[i];
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
static void find_hid_devices(void)
|
||||
static void find_devices(void)
|
||||
{
|
||||
static ULONGLONG last_check;
|
||||
@@ -415,6 +451,7 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE device, UINT command, void *data, UINT
|
||||
device, command, data, data_size);
|
||||
@@ -438,6 +474,7 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE handle, UINT command, void *data, UINT
|
||||
handle, command, data, data_size);
|
||||
|
||||
if (!data_size) return ~0U;
|
||||
+ if (!device) return ~0U;
|
||||
@ -123,10 +123,10 @@ index 8cf9f8ebf62..72ae91cfcb5 100644
|
||||
/* each case below must set:
|
||||
* *data_size: length (meaning defined by command) of data we want to copy
|
||||
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
|
||||
index e8f6abb6813..0c3d52fca5b 100644
|
||||
index 5172423280b..4c478db5449 100644
|
||||
--- a/dlls/user32/user_private.h
|
||||
+++ b/dlls/user32/user_private.h
|
||||
@@ -378,4 +378,6 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
|
||||
@@ -375,4 +375,6 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
|
||||
return dst;
|
||||
}
|
||||
|
||||
@ -134,5 +134,5 @@ index e8f6abb6813..0c3d52fca5b 100644
|
||||
+
|
||||
#endif /* __WINE_USER_PRIVATE_H */
|
||||
--
|
||||
2.24.1
|
||||
2.25.1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user