Rémi Bernon : winebus.sys: Always call the EVDEV ioctls for input UDEV subsystem.

Alexandre Julliard julliard at winehq.org
Mon Aug 16 18:07:25 CDT 2021


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Aug 16 08:56:21 2021 +0200

winebus.sys: Always call the EVDEV ioctls for input UDEV subsystem.

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

---

 dlls/winebus.sys/bus_udev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c
index 864ffc0bf09..5db1014c09f 100644
--- a/dlls/winebus.sys/bus_udev.c
+++ b/dlls/winebus.sys/bus_udev.c
@@ -1105,7 +1105,6 @@ static void try_add_device(struct udev_device *dev)
     }
 #endif
 
-    subsystem = udev_device_get_subsystem(dev);
     hiddev = udev_device_get_parent_with_subsystem_devtype(dev, "hid", NULL);
     if (hiddev)
     {
@@ -1126,8 +1125,10 @@ static void try_add_device(struct udev_device *dev)
             version = a_to_bcd(bcdDevice);
         }
     }
+
+    subsystem = udev_device_get_subsystem(dev);
 #ifdef HAS_PROPER_INPUT_HEADER
-    else
+    if (!strcmp(subsystem, "input"))
     {
         struct input_id device_id = {0};
         char device_uid[255];
@@ -1142,9 +1143,6 @@ static void try_add_device(struct udev_device *dev)
         pid = device_id.product;
         version = device_id.version;
     }
-#else
-    else
-        WARN("Could not get device to query VID, PID, Version and Serial\n");
 #endif
 
     if (is_xbox_gamepad(vid, pid))




More information about the wine-cvs mailing list