Andrew Eikum : winebus: Don't override real VID/PID for controllers.
Alexandre Julliard
julliard at winehq.org
Fri Nov 23 14:18:02 CST 2018
Module: wine
Branch: master
Commit: ccb06c6b6f74d61b2d89b6d02afee4f589e3f4a5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ccb06c6b6f74d61b2d89b6d02afee4f589e3f4a5
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Thu Nov 22 10:56:01 2018 +1100
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 at redmandi.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winebus.sys/bus_sdl.c | 42 ++++++++----------------------------------
1 file changed, 8 insertions(+), 34 deletions(-)
diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c
index 4f0f685..5cf5ddd 100644
--- a/dlls/winebus.sys/bus_sdl.c
+++ b/dlls/winebus.sys/bus_sdl.c
@@ -59,24 +59,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
#ifdef SONAME_LIBSDL2
-#define VID_MICROSOFT 0x045e
-
-static const WORD PID_XBOX_CONTROLLERS[] = {
- 0x0202, /* Xbox Controller */
- 0x0285, /* Xbox Controller S */
- 0x0289, /* Xbox Controller S */
- 0x028e, /* Xbox360 Controller */
- 0x028f, /* Xbox360 Wireless Controller */
- 0x02d1, /* Xbox One Controller */
- 0x02dd, /* Xbox One Controller (Covert Forces/Firmware 2015) */
- 0x02e0, /* Xbox One X Controller */
- 0x02e3, /* Xbox One Elite Controller */
- 0x02e6, /* Wireless XBox Controller Dongle */
- 0x02ea, /* Xbox One S Controller */
- 0x02fd, /* Xbox One S Controller (Firmware 2017) */
- 0x0719, /* Xbox 360 Wireless Adapter */
-};
-
WINE_DECLARE_DEBUG_CHANNEL(hid_report);
static DRIVER_OBJECT *sdl_driver_obj = NULL;
@@ -818,25 +800,17 @@ static void try_add_device(SDL_JoystickID index)
controller = pSDL_GameControllerOpen(index);
id = pSDL_JoystickInstanceID(joystick);
- if (controller)
- {
- vid = VID_MICROSOFT;
- pid = PID_XBOX_CONTROLLERS[3];
- version = 0x01;
+
+ if (pSDL_JoystickGetProductVersion != NULL) {
+ vid = pSDL_JoystickGetVendor(joystick);
+ pid = pSDL_JoystickGetProduct(joystick);
+ version = pSDL_JoystickGetProductVersion(joystick);
}
else
{
- if (pSDL_JoystickGetProductVersion != NULL) {
- vid = pSDL_JoystickGetVendor(joystick);
- pid = pSDL_JoystickGetProduct(joystick);
- version = pSDL_JoystickGetProductVersion(joystick);
- }
- else
- {
- vid = 0x01;
- pid = pSDL_JoystickInstanceID(joystick) + 1;
- version = 0;
- }
+ vid = 0x01;
+ pid = pSDL_JoystickInstanceID(joystick) + 1;
+ version = 0;
}
guid = pSDL_JoystickGetGUID(joystick);
More information about the wine-cvs
mailing list