Skip to content

Commit

Permalink
Ignore both the mouse and keyboard endpoints of Steam Controllers whe…
Browse files Browse the repository at this point in the history
…n enumerating game controllers
  • Loading branch information
slouken committed May 31, 2023
1 parent c886e80 commit 4f58445
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hidapi/SDL_hidapi.c
Expand Up @@ -1061,8 +1061,8 @@ SDL_bool SDL_HIDAPI_ShouldIgnoreDevice(Uint16 vendor_id, Uint16 product_id, Uint
/* See if there are any devices we should skip in enumeration */
if (SDL_hidapi_only_controllers && usage_page) {
if (vendor_id == USB_VENDOR_VALVE) {
/* Ignore the keyboard interface on Steam Controllers */
if (usage == USB_USAGE_GENERIC_KEYBOARD) {
/* Ignore the mouse/keyboard interface on Steam Controllers */
if (usage == USB_USAGE_GENERIC_KEYBOARD || usage == USB_USAGE_GENERIC_MOUSE) {
return SDL_TRUE;
}
} else if (usage_page == USB_USAGEPAGE_GENERIC_DESKTOP &&
Expand Down

0 comments on commit 4f58445

Please sign in to comment.