Rémi Bernon : user32: Don't read preparsed data on non-HID devices.

Alexandre Julliard julliard at winehq.org
Tue Apr 28 16:32:20 CDT 2020


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Apr 27 14:36:03 2020 +0200

user32: Don't read preparsed data on non-HID devices.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/rawinput.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index 2465262f74..dd2ac2e208 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -492,7 +492,8 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE handle, UINT command, void *data, UINT
 
     case RIDI_PREPARSEDDATA:
         avail_bytes = *data_size;
-        if (handle == WINE_MOUSE_HANDLE || handle == WINE_KEYBOARD_HANDLE)
+        if (handle == WINE_MOUSE_HANDLE || handle == WINE_KEYBOARD_HANDLE ||
+            device->info.dwType != RIM_TYPEHID)
         {
             to_copy_bytes = 0;
             *data_size = 0;




More information about the wine-cvs mailing list