Some games are checking the hid product string of connected gamepads in
order to decide whether or not to activate rumble.
Wine usually delegates these queries to the backend driver, but they
don't always report the same product strings as on Windows. This will
allow to override backend strings with the actual strings as reported
by native drivers.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Some games are using the HID device id as the gamepad index for xinput
API. When hotplugging devices, SDL increases its instance id and it
doesn't match anymore with xinput gamepad numbers.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The current buffer is 1024, however the ioctl call can handle
a max length of 8191.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47013
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This fixes opening SDL haptic handles after a device is removed and
re-added.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The instance ID is only the third part of the "A\B\C" form, and must be
combined with the device ID to form the whole name for setupapi (the "device
instance ID").
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
It's the only one we actually match against.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This is not a documented function, and anyway we don't need separate driver
objects.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This partially reverts 164517fe57. The
manufacturer, product, and serial string attributes are not exposed by the
HID device on Linux, but by its parent USB device.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46711
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
INSIDE parses the HID report directly and assumes that the logical
minimum value is 0.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
These were introduced in commit 1333206 and have gone missing in one of
the previous cleanup commits.
Signed-off-by: Kai Krakow <kai@kaishome.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
It's unclear what this was useful for, possibly native xinput requires
it. Our built-in xinput is good enough now, though, so let's keep the
real VID/PID.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Device reports may come in faster than our consumers could possibly read
them, this is especially true for multi-axis events: When you move a
stick across its range, it will always generate at least two events, one
for the x axis, and one for the y axis. This is not really an error
situation, so let's just discard the error message.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43125
Signed-off-by: Kai Krakow <kai@kaishome.de>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>