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>
This commit is contained in:
parent
3e927c4aec
commit
40ae0e8455
|
@ -290,6 +290,7 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void *
|
|||
CFStringRef str = NULL;
|
||||
WCHAR serial_string[256];
|
||||
BOOL is_gamepad = FALSE;
|
||||
WORD input = -1;
|
||||
|
||||
TRACE("OS/X IOHID Device Added %p\n", IOHIDDevice);
|
||||
|
||||
|
@ -344,9 +345,12 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void *
|
|||
is_gamepad = (axes == 6 && buttons >= 14);
|
||||
}
|
||||
}
|
||||
if (is_gamepad)
|
||||
input = 0;
|
||||
|
||||
device = bus_create_hid_device(iohid_driver_obj, busidW, vid, pid, -1, version, uid, str?serial_string:NULL,
|
||||
is_gamepad, &GUID_DEVCLASS_IOHID, &iohid_vtbl, sizeof(struct platform_private));
|
||||
device = bus_create_hid_device(iohid_driver_obj, busidW, vid, pid, input,
|
||||
version, uid, str?serial_string:NULL, is_gamepad, &GUID_DEVCLASS_IOHID,
|
||||
&iohid_vtbl, sizeof(struct platform_private));
|
||||
if (!device)
|
||||
ERR("Failed to create device\n");
|
||||
else
|
||||
|
|
|
@ -891,6 +891,7 @@ static void try_add_device(SDL_JoystickID index)
|
|||
WCHAR serial[34] = {0};
|
||||
char guid_str[34];
|
||||
BOOL is_xbox_gamepad;
|
||||
WORD input = -1;
|
||||
|
||||
SDL_Joystick* joystick;
|
||||
SDL_JoystickID id;
|
||||
|
@ -941,9 +942,12 @@ static void try_add_device(SDL_JoystickID index)
|
|||
button_count = pSDL_JoystickNumButtons(joystick);
|
||||
is_xbox_gamepad = (axis_count == 6 && button_count >= 14);
|
||||
}
|
||||
if (is_xbox_gamepad)
|
||||
input = 0;
|
||||
|
||||
device = bus_create_hid_device(sdl_driver_obj, sdl_busidW, vid, pid, -1, version, id, serial,
|
||||
is_xbox_gamepad, &GUID_DEVCLASS_SDL, &sdl_vtbl, sizeof(struct platform_private));
|
||||
device = bus_create_hid_device(sdl_driver_obj, sdl_busidW, vid, pid,
|
||||
input, version, id, serial, is_xbox_gamepad, &GUID_DEVCLASS_SDL,
|
||||
&sdl_vtbl, sizeof(struct platform_private));
|
||||
|
||||
if (device)
|
||||
{
|
||||
|
|
|
@ -1205,6 +1205,8 @@ static void try_add_device(struct udev_device *dev)
|
|||
is_gamepad = (axes == 6 && buttons >= 14);
|
||||
}
|
||||
#endif
|
||||
if (input == (WORD)-1 && is_gamepad)
|
||||
input = 0;
|
||||
|
||||
|
||||
TRACE("Found udev device %s (vid %04x, pid %04x, version %u, serial %s)\n",
|
||||
|
|
Loading…
Reference in New Issue