mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
52 lines
1.8 KiB
Diff
52 lines
1.8 KiB
Diff
From cce25a3d567e6afcff3ccf97c46f08b9d2dda42f Mon Sep 17 00:00:00 2001
|
|
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.
|
|
|
|
---
|
|
dlls/hidclass.sys/pnp.c | 13 +++++++++++++
|
|
1 file changed, 13 insertions(+)
|
|
|
|
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c
|
|
index 5e50ee90c60..15f4c12cba5 100644
|
|
--- a/dlls/hidclass.sys/pnp.c
|
|
+++ b/dlls/hidclass.sys/pnp.c
|
|
@@ -26,6 +26,8 @@
|
|
#include "ntddkbd.h"
|
|
#include "ddk/hidtypes.h"
|
|
#include "ddk/wdm.h"
|
|
+#include "initguid.h"
|
|
+#include "devpkey.h"
|
|
#include "regstr.h"
|
|
#include "winuser.h"
|
|
#include "wine/debug.h"
|
|
@@ -88,6 +90,8 @@ static NTSTATUS get_device_id(DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WCH
|
|
return irp_status.u.Status;
|
|
}
|
|
|
|
+DEFINE_DEVPROPKEY(DEVPROPKEY_HID_HANDLE, 0xbc62e415, 0xf4fe, 0x405c, 0x8e, 0xda, 0x63, 0x6f, 0xb5, 0x9f, 0x08, 0x98, 2);
|
|
+
|
|
/* user32 reserves 1 & 2 for winemouse and winekeyboard,
|
|
* keep this in sync with user_private.h */
|
|
#define WINE_MOUSE_HANDLE 1
|
|
@@ -248,6 +252,15 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
|
|
else
|
|
pdo_ext->u.pdo.rawinput_handle = alloc_rawinput_handle();
|
|
|
|
+ status = IoSetDevicePropertyData(child_pdo, &DEVPROPKEY_HID_HANDLE, LOCALE_NEUTRAL,
|
|
+ PLUGPLAY_PROPERTY_PERSISTENT, DEVPROP_TYPE_UINT32,
|
|
+ sizeof(pdo_ext->u.pdo.rawinput_handle), &pdo_ext->u.pdo.rawinput_handle);
|
|
+ if (status != STATUS_SUCCESS)
|
|
+ {
|
|
+ FIXME("failed to set device property %x\n", status);
|
|
+ return;
|
|
+ }
|
|
+
|
|
pdo_ext->u.pdo.poll_interval = DEFAULT_POLL_INTERVAL;
|
|
|
|
pdo_ext->u.pdo.ring_buffer = RingBuffer_Create(
|
|
--
|
|
2.30.2
|
|
|