Commit Graph

43 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
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 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
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
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
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
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 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 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 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
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 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
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 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
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
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
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
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
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
Aric Stewart 2505d67cbc winebus.sys: Map SDL game controllers if requested.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 20:07:41 +01:00
Aric Stewart 67ce6235e8 winebus.sys: Process SDL device reports.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 20:07:41 +01:00
Aric Stewart eda33b4b61 winebus.sys: Build SDL device report.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 20:07:41 +01:00
Aric Stewart 752de1b566 winebus.sys: Support adding and removing SDL devices.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 20:07:41 +01:00
Aric Stewart f8c0228dc2 winebus.sys: Add SDL gamepad and joystick driver.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 18:51:58 +01:00