2021-04-25 17:54:52 +10:00
|
|
|
From cce25a3d567e6afcff3ccf97c46f08b9d2dda42f Mon Sep 17 00:00:00 2001
|
2021-04-09 17:39:38 -05:00
|
|
|
From: Arkadiusz Hiler <ahiler@codeweavers.com>
|
|
|
|
Date: Wed, 10 Feb 2021 13:23:33 +0100
|
|
|
|
Subject: [PATCH] hidclass.sys: Assign rawinput handles through device
|
|
|
|
properties.
|
|
|
|
|
|
|
|
---
|
2021-04-19 18:11:23 -05:00
|
|
|
dlls/hidclass.sys/pnp.c | 13 +++++++++++++
|
2021-04-16 17:42:09 -05:00
|
|
|
1 file changed, 13 insertions(+)
|
2021-04-09 17:39:38 -05:00
|
|
|
|
2021-04-19 18:11:23 -05:00
|
|
|
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c
|
2021-04-25 17:54:52 +10:00
|
|
|
index 5e50ee90c60..15f4c12cba5 100644
|
2021-04-19 18:11:23 -05:00
|
|
|
--- a/dlls/hidclass.sys/pnp.c
|
|
|
|
+++ b/dlls/hidclass.sys/pnp.c
|
2021-04-24 10:22:14 +10:00
|
|
|
@@ -26,6 +26,8 @@
|
|
|
|
#include "ntddkbd.h"
|
2021-04-16 17:42:09 -05:00
|
|
|
#include "ddk/hidtypes.h"
|
|
|
|
#include "ddk/wdm.h"
|
2021-04-19 18:11:23 -05:00
|
|
|
+#include "initguid.h"
|
2021-04-09 17:39:38 -05:00
|
|
|
+#include "devpkey.h"
|
2021-04-19 18:11:23 -05:00
|
|
|
#include "regstr.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "wine/debug.h"
|
2021-04-24 10:22:14 +10:00
|
|
|
@@ -88,6 +90,8 @@ static NTSTATUS get_device_id(DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WCH
|
2021-04-19 18:11:23 -05:00
|
|
|
return irp_status.u.Status;
|
|
|
|
}
|
2021-04-09 17:39:38 -05:00
|
|
|
|
|
|
|
+DEFINE_DEVPROPKEY(DEVPROPKEY_HID_HANDLE, 0xbc62e415, 0xf4fe, 0x405c, 0x8e, 0xda, 0x63, 0x6f, 0xb5, 0x9f, 0x08, 0x98, 2);
|
|
|
|
+
|
2021-04-16 17:42:09 -05:00
|
|
|
/* user32 reserves 1 & 2 for winemouse and winekeyboard,
|
|
|
|
* keep this in sync with user_private.h */
|
|
|
|
#define WINE_MOUSE_HANDLE 1
|
2021-04-24 10:22:14 +10:00
|
|
|
@@ -248,6 +252,15 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
|
2021-04-09 17:39:38 -05:00
|
|
|
else
|
2021-04-19 18:11:23 -05:00
|
|
|
pdo_ext->u.pdo.rawinput_handle = alloc_rawinput_handle();
|
2021-04-09 17:39:38 -05:00
|
|
|
|
2021-04-19 18:11:23 -05:00
|
|
|
+ status = IoSetDevicePropertyData(child_pdo, &DEVPROPKEY_HID_HANDLE, LOCALE_NEUTRAL,
|
2021-04-09 17:39:38 -05:00
|
|
|
+ PLUGPLAY_PROPERTY_PERSISTENT, DEVPROP_TYPE_UINT32,
|
2021-04-19 18:11:23 -05:00
|
|
|
+ sizeof(pdo_ext->u.pdo.rawinput_handle), &pdo_ext->u.pdo.rawinput_handle);
|
2021-04-09 17:39:38 -05:00
|
|
|
+ if (status != STATUS_SUCCESS)
|
|
|
|
+ {
|
|
|
|
+ FIXME("failed to set device property %x\n", status);
|
2021-04-25 17:54:52 +10:00
|
|
|
+ return;
|
2021-04-09 17:39:38 -05:00
|
|
|
+ }
|
|
|
|
+
|
2021-04-19 18:11:23 -05:00
|
|
|
pdo_ext->u.pdo.poll_interval = DEFAULT_POLL_INTERVAL;
|
2021-04-09 17:39:38 -05:00
|
|
|
|
2021-04-19 18:11:23 -05:00
|
|
|
pdo_ext->u.pdo.ring_buffer = RingBuffer_Create(
|
2021-04-09 17:39:38 -05:00
|
|
|
--
|
|
|
|
2.30.2
|
|
|
|
|