Commit Graph

87 Commits

Author SHA1 Message Date
Zebediah Figura 9c6ea01935 winebus.sys: Create a stub mouse device.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:53 +02:00
Alistair Leslie-Hughes 90a1e5d943 winebus.sys: Increase buffer size to match max length available.
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>
2019-06-28 10:57:55 +02:00
Andrew Eikum f8a04c7f2e winebus.sys: Close SDL handles when a device is removed.
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>
2019-06-11 18:28:55 +02:00
Zebediah Figura 6c6aeea8a8 ntoskrnl.exe: Correctly handle instance IDs.
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>
2019-06-05 16:46:20 +02:00
Zebediah Figura eebb1d9931 winebus.sys: Allocate IRP return buffers from paged pool.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 16:44:49 +02:00
Zebediah Figura e83fd91d5f winebus.sys: Just report the bus ID when enumerating compatible IDs.
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>
2019-06-04 23:05:46 +02:00
Zebediah Figura f39adfe914 winebus.sys: Make the device and instance IDs consistent.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-04 23:05:40 +02:00
Zebediah Figura 9af088243c winebus.sys: Avoid IoCreateDriver().
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>
2019-05-30 21:53:26 +02:00
Zebediah Figura d525c736b9 winebus.sys: Move udev configuration values to the winebus service key.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:26 +02:00
Zebediah Figura 50b9456e87 winebus.sys: Use the winebus driver to create all devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:26 +02:00
Andrew Eikum f8ebb3ac37 winebus.sys: Add missing padding between hatswitch and constant.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 18:31:45 +02:00
Piotr Caban 40ae0e8455 winebus.sys: Restore IG_ substring in gamepads endpoint path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47209
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Andrew Eikum 042e062569 winebus.sys: Fix report length calculation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47188
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 23:04:49 +02:00
Piotr Caban 8cd6d61639 winebus.sys: Correctly set HID device input number in device endpoint path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:24:43 +02:00
Piotr Caban 6a0005747c winebus.sys: Fix typo in endpoint name.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:24:40 +02:00
Alexandre Julliard c0604a9341 winebus.sys: Avoid ssize_t.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 20:39:22 +02:00
Andrew Eikum 5ff326f801 winebus.sys: Pack hatswitch values into button bytes.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 15:20:18 -05:00
Andrew Eikum ba79a14369 winebus.sys: Report SDL controller buttons in the right order.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 15:20:11 -05:00
Andrew Eikum 564e7b4db9 winebus.sys: Report SDL controller dpad as hatswitch.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 15:20:02 -05:00
Andrew Eikum 2239aae97f winebus.sys: Report hatswitch values correctly.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 15:19:50 -05:00
Andrew Eikum d0c5a5e89f winebus.sys: Order axes before buttons.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 15:19:40 -05:00
Andrew Eikum ec7bdf6154 winebus.sys: Fix ball value reporting.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:33 -05:00
Andrew Eikum e529387f67 winebus.sys: Remove some magic numbers.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:33 -05:00
Andrew Eikum 277822b384 winebus.sys: Fix udev report descriptor length.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:33 -05:00
Andrew Eikum 3039eeb72e winebus.sys: Fix some report descriptors.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:33 -05:00
Piotr Caban 9267973835 winebus.sys: Add more traces on hidraw communication errors.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 16:31:44 +02:00
Aric Stewart 1528d1685a winebus.sys: Allow mapping of SDL controllers.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Zebediah Figura cc3820ca99 winebus.sys: Retrieve hidraw device strings from the parent USB device.
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>
2019-04-01 21:54:31 +02:00
Zhiyi Zhang f4d5b357d3 winebus.sys: Handle create existent device failure.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 19:32:38 +01:00
Aric Stewart 9491a5e58a winebus.sys: Add UID to IOHID devices.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 08:23:39 +01:00
Alexandre Julliard 3d7471570e makefiles: Pass --subsystem to the linker also.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 15:28:48 +01:00
Michael Stefaniuc d64de0e2c1 winebus.sys: Remove useless casts to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 12:27:02 +01:00
Zebediah Figura bd9e130ee5 winebus.sys: Translate SDL controller axes to unsigned 32-bit values.
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>
2019-02-06 19:57:27 +01:00
Kai Krakow 383c3128bb winebus.sys: Re-add missing Xbox controller PIDs.
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>
2018-12-14 11:15:38 +01:00
Andrew Eikum ccb06c6b6f winebus: Don't override real VID/PID for controllers.
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>
2018-11-23 20:17:44 +01:00
Brendan McGrath 9736a36fe6 winebus.sys: Use JoystickNumButtons for button_count.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 18:08:08 +01:00
Francois Gouget a0536cab03 winebus.sys: Avoid an unneeded strlen() call.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 16:34:52 +02:00
Francois Gouget 90de9129cc winebus.sys: Add a trailing '\n' to a TRACE().
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-27 10:09:25 +02:00
Aric Stewart 5815c7b520 winebus.sys: Implement IRP_MN_QUERY_DEVICE_RELATIONS.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-13 10:39:02 +02:00
Aric Stewart db6c5b59b6 winebus.sys: Improve unloading the winebus driver.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-13 10:39:00 +02:00
Francois Gouget a53591ad3c winebus.sys: Avoid calling strdup().
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 20:01:56 +02:00
Kai Krakow d744f367d2 winebus.sys: Do not print HID report read errors.
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>
2018-08-15 21:08:21 +02:00
Michael Stefaniuc d3e86f6652 winebus.sys: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:02 +02:00
Józef Kucia 142169960a winebus: Print SDL error message when SDL cannot be initialized.
SDL_Init(SDL_INIT_HAPTIC) fails if SDL is built without haptic support.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 17:20:41 +02:00
Aric Stewart 5631402651 winebus: Properly identify SDL joysticks index when hot-plugged.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-08 20:29:54 +02:00
Francois Gouget 76d6151b73 winebus.sys: Fix a typo in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-18 10:13:12 +02:00
Kai Krakow 1333206e08 winebus.sys: Map more SDL Xbox controllers.
These device ids are usually returned by newer firmware versions.
Especially, the Android mode of the controller (when paired by
bluetooth to a Linux system) changes the input mapping of the
controller. The current kernel drivers do not correct this, xpadneo[1]
is needed as the driver to get correct mapping.

[1]: https://github.com/atar-axis/xpadneo

Signed-off-by: Kai Krakow <kai@kaishome.de>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 13:24:16 +01:00
Alexandre Julliard f1c344bc62 winebus.sys: Define SYN_DROPPED if missing.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-26 16:40:23 +01:00
Aric Stewart 164517fe57 winebus.sys: Do not depend on USB devices.
Allows for bluetooth devices to work as well
Based on work and testing by Michael Menegakis <arxeio@gmail.com>.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 20:07:42 +01:00
Aric Stewart 249db7e49e winebus.sys: Implement SDL Haptic for controller vibration.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 20:07:41 +01:00