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>
This commit is contained in:
parent
d1443c3a50
commit
ccb06c6b6f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue