Skip to content

Commit

Permalink
Don't try to interpret Xbox controllers as raw HID devices on Windows
Browse files Browse the repository at this point in the history
These generate fake reports which don't include separate trigger axes, and the HIDAPI joystick driver doesn't understand this report format.
  • Loading branch information
slouken committed May 31, 2023
1 parent adad651 commit b6a88b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hidapi/windows/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,11 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
HANDLE device_handle = INVALID_HANDLE_VALUE;
HIDD_ATTRIBUTES attrib;

/* XInput devices don't get real HID reports and are better handled by the raw input driver */
if (wcsstr(device_interface, L"&IG_") != NULL) {
continue;
}

/* Open read-only handle to the device */
device_handle = open_device(device_interface, FALSE);

Expand Down

0 comments on commit b6a88b0

Please sign in to comment.