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

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-08-16 08:56:21 +02:00 committed by Alexandre Julliard
parent 5c3f2f88a6
commit acff5b4191
1 changed files with 3 additions and 5 deletions

View File

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