Rémi Bernon
12d91995fd
winebus.sys: Add a PID effect update output report.
...
Advertising support of the periodic effect types only for now.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 11:33:19 +02:00
Rémi Bernon
3b3228e9c7
winebus.sys: Add a PID effect control output report.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-04 11:01:56 +02:00
Rémi Bernon
903c7ea75d
winebus.sys: Add a PID device control output report.
...
And include it in the HID report descriptor when SDL device has support
for any haptic effect, or when UDEV lnxev device has any FF bit set.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-01 12:37:17 +02:00
Rémi Bernon
e42f11d7a2
winebus.sys: Remove old vendor rumble report.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-24 21:55:19 +02:00
Rémi Bernon
cb4d378fa9
winebus.sys: Add a new rumble report using HID haptics.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-24 21:55:19 +02:00
Rémi Bernon
78f67d5c08
winebus.sys: Handle feature and output reports in hid_device.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 10:28:45 +02:00
Rémi Bernon
04b19a969b
winebus.sys: Use report ids in crafted HID reports.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 10:28:39 +02:00
Rémi Bernon
9cf1e8353c
winebus.sys: Factor out setting HID report values.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 10:28:33 +02:00
Rémi Bernon
c6df23fed3
winebus.sys: Factor out HID report buffers allocation.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 10:28:21 +02:00
Rémi Bernon
9d5e9b5f42
winebus.sys: Use the computed element offsets to create reports.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-22 21:48:10 +02:00
Rémi Bernon
de050c974b
winebus.sys: Compute offsets while building the report descriptor.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-22 21:48:07 +02:00
Rémi Bernon
fa3905bafa
winebus.sys: Introduce a new raw_device / hid_device abstraction.
...
For any device which requires building HID reports.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-22 21:48:02 +02:00
Rémi Bernon
8221229498
winebus.sys: Always add padding after button blocks.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:40:58 +02:00
Rémi Bernon
d7c4867257
winebus.sys: Enforce all axis values to be 32bit.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:40:43 +02:00
Rémi Bernon
5bbf1d1095
winebus.sys: Use new unixlib subsystem.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 10:45:46 +02:00
Rémi Bernon
e54ff70e5d
winebus.sys: Build with msvcrt.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 10:45:38 +02:00
Rémi Bernon
7032b41747
winebus.sys: Move is_xbox_gamepad to unixlib.c.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 10:50:34 +02:00
Rémi Bernon
2a2fc11d8c
winebus.sys: Remove the now useless device_compare callback.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 10:50:32 +02:00
Rémi Bernon
421a6f53ad
winebus.sys: Pass a unix_device pointer in every bus event.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 10:50:30 +02:00
Rémi Bernon
cdaf1d9a7f
winebus.sys: Remove the DEVICE_OBJECT arg on device_start.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:03:41 +02:00
Rémi Bernon
8b434bdc7f
winebus.sys: Return an event from SDL bus wait on input report.
...
Instead of calling process_hid_report.
This adds a reference count on unix devices to make sure they are kept
alive until all their input report events have been processed.
This also uses a bus-specific device list, to be able to find devices
from joystick ids without having to call back to the win32 side.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:03:03 +02:00
Rémi Bernon
1f12b2160d
winebus.sys: Free unix device in unix_device_remove.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 11:50:01 +02:00
Rémi Bernon
b86eade743
winebus.sys: Use helpers to create and destroy unix devices.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 11:49:57 +02:00
Rémi Bernon
cd830398dd
winebus.sys: Split destroy to a separate stop method.
...
So we can stop the device when it's removed from the ntoskrnl.exe device
list, and then destroy it only when it's not referenced anymore.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 11:49:55 +02:00
Rémi Bernon
56a4aaf419
winebus.sys: Remove the now useless get_string callback.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 21:12:39 +02:00
Rémi Bernon
507a3076de
winebus.sys: Return an event from SDL bus wait on device creation.
...
Instead of calling bus_create_hid_device.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-08 20:40:48 +02:00
Rémi Bernon
6ce5ba8f2f
winebus.sys: Look for duplicate UDEV devices on the unix side.
...
Devices are only added from a single thread but they may be destroyed
concurrently so we need to guard the list against race conditions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Rémi Bernon
4366cba6e6
winebus.sys: Move device vtable to the struct unix_device side.
...
And name the callbacks a bit more consistently.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Rémi Bernon
5e0c1ce443
winebus.sys: Move mouse and keyboard devices to unixlib.c.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-02 21:57:38 +02:00
Rémi Bernon
6006758ca8
winebus.sys: Return an event from SDL bus wait on device removal.
...
Instead of calling bus_unlink_hid_device or IoInvalidateDeviceRelations.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-02 21:57:38 +02:00
Rémi Bernon
09c14c6321
winebus.sys: Allocate private device data separately.
...
And use an opaque struct unix_device as private data.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 11:18:16 +02:00
Rémi Bernon
edbb3fac25
winebus.sys: Introduce a new unixlib interface.
...
And use it for bus entry points.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 11:18:11 +02:00