[PATCH 3/5] server: Add support for RIDEV_DEVNOTIFY rawinput flag.
Rémi Bernon
rbernon at codeweavers.com
Tue May 11 03:17:19 CDT 2021
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/user32/rawinput.c | 2 +-
server/queue.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index f2d64ccc23b..d95d29d7656 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -468,7 +468,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH RegisterRawInputDevices(RAWINPUTDEVICE *devices, U
TRACE("device %u: page %#x, usage %#x, flags %#x, target %p.\n",
i, devices[i].usUsagePage, devices[i].usUsage,
devices[i].dwFlags, devices[i].hwndTarget);
- if (devices[i].dwFlags & ~(RIDEV_REMOVE|RIDEV_NOLEGACY|RIDEV_INPUTSINK))
+ if (devices[i].dwFlags & ~(RIDEV_REMOVE|RIDEV_NOLEGACY|RIDEV_INPUTSINK|RIDEV_DEVNOTIFY))
FIXME("Unhandled flags %#x for device %u.\n", devices[i].dwFlags, i);
d[i].usage_page = devices[i].usUsagePage;
diff --git a/server/queue.c b/server/queue.c
index a0d46d75cf5..ef5aa02bdb3 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1685,6 +1685,8 @@ static int queue_rawinput_message( struct process* process, void *arg )
device = &entry->device;
if (!device) return 0;
+ if (raw_msg->message == WM_INPUT_DEVICE_CHANGE && !(device->flags & RIDEV_DEVNOTIFY)) return 0;
+
if (process != raw_msg->foreground->process)
{
if (!(device->flags & RIDEV_INPUTSINK)) goto done;
--
2.31.0
More information about the wine-devel
mailing list