Commit Graph

117 Commits

Author SHA1 Message Date
Alex Henrie 3e8b27fef3 winebus: Remove redundant preprocessor check for libsdl2.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-29 21:18:53 +01:00
Dean M Greer e4fbae832c configure: Don't prepend folder name for SDL.h.
This fixes pkgconfig SDL2 detection when SDL2 is installed in a non-standard location.

Signed-off-by: Dean M Greer <gcenx83@gmail.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-02 21:47:41 +01:00
Hans Leidekker 3a007a95e8 winebus.sys: Support setting SDL controller mapping through environment variable.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50154
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 20:20:27 +01:00
Hans Leidekker 6ce03d9313 winebus.sys: Fix registry access rights for SDL controller mapping.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48545
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 20:20:24 +01:00
Brendan Shanks 9c0c0e2b57 winebus.sys: Open IOHID devices individually to fix macOS Catalina and Big Sur.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50153
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 16:53:52 +01:00
Alexandre Julliard 4650dff5c4 winebus.sys: Move winebus.inf into the module resources.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-11 11:04:06 +01:00
Francois Gouget 335656e433 winebus.sys: Fix the spelling of HID_USAGE_SIMULATION_ACCELERATOR.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:16:36 +02:00
Alexandre Julliard 3760b7a9f8 winebus.sys: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:20 +02:00
Zebediah Figura 602f20826d winebus.sys: Use public HID_USAGE_* constants.
Fix a typo in the process (HID_USAGE_DIGITIZER_Y_TILT is 0x3E, not 0x3F).

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Zebediah Figura da7d60bf97 winebus.sys: Fix reporting axis values for joysticks.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 22:16:30 +01:00
Michael Cronenworth 388348ddbf winebus: Global variable compatibility update for gcc 10.
Signed-off-by: Michael Cronenworth <mike@cchtml.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 18:19:06 +01:00
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