Rémi Bernon : server: Add support for RIDEV_DEVNOTIFY rawinput flag.

Alexandre Julliard julliard at winehq.org
Tue May 11 16:33:59 CDT 2021


Module: wine
Branch: master
Commit: 371be0bc1c7efe87ad91fa0efec8e9cee30cbd1a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=371be0bc1c7efe87ad91fa0efec8e9cee30cbd1a

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue May 11 10:17:19 2021 +0200

server: Add support for RIDEV_DEVNOTIFY rawinput flag.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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;




More information about the wine-cvs mailing list