Andrew Eikum
6cb3d0fb37
winebus.sys: Don't return too early if SDL initialization succeeds.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-21 20:56:05 +01:00
Piotr Caban
c3bfc1b726
winebus: Fix DEVICE_RELATIONS content on device removal.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Piotr Caban
cc395391ed
winebus: Reference PDOs added to DEVICE_RELATIONS structure.
...
Fixes crash caused by 81cda52d15
.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Zebediah Figura
c074966b9d
winebus.sys: Stop creating a setupapi device.
...
ntoskrnl.exe handles this now.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:55 +01:00
Zebediah Figura
81cda52d15
ntoskrnl.exe: BusRelations is also used when devices are removed.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:53 +01:00
Zebediah Figura
ca683dcaad
ntoskrnl.exe: IoInvalidateDeviceRelations() receives the parent PDO.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:51 +01:00
Zebediah Figura
a60a014dc4
winebus.sys: Initialize and teardown the HID backends while the bus FDO is still extant.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:46 +01:00
Zebediah Figura
cba5674d60
winebus.sys: Implement AddDevice().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:39 +01:00
Piotr Caban
5e8eb5f4c5
winebus.sys: Make device_id string more similar to native.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 00:46:29 +02:00
Piotr Caban
9d5c801d35
winebus.sys: Stop SDL deviceloop_thread to avoid crash on driver unload.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 14:50:41 +02:00
Piotr Caban
485aed9f1c
winebus.sys: Don't do anything in iohid_driver_unload if iohid was not initialized.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 14:50:35 +02:00
Piotr Caban
ef59d2d11f
winebus.sys: Don't do anything in udev_driver_unload if udev was not initialized.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 14:50:31 +02:00
Rémi Bernon
f36e9e3a2c
winebus.sys: Report the native product string for some Xbox gamepads.
...
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>
2019-09-20 12:50:10 +02:00
Rémi Bernon
3d2f43a1da
winebus.sys: Use the SDL joystick index as device id instead of instance id.
...
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>
2019-09-20 12:50:07 +02:00
Andrew Eikum
e83f427a65
winebus.sys: Fix build without Linux event support.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-18 23:04:26 +02:00
Piotr Caban
4b3437907b
winebus.sys: Stop device report threads to avoid crash on driver unload.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 16:50:44 +02:00
Piotr Caban
90fa9967bc
winebus.sys: Stop deviceloop_thread to avoid crash on driver unload.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 16:50:44 +02:00
Andrew Eikum
439b80e4c4
winebus.sys: Don't WARN about backends we didn't build.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-11 17:03:04 +02:00
Andrew Eikum
d5fb7383d0
winebus.sys: Report device revision number for hidraw, too.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 16:15:56 +02:00
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