Fixed detecting Bluetooth Steam Controllers on Windows
This commit is contained in:
parent
17c397f7ec
commit
d032492aab
1 changed files with 8 additions and 2 deletions
|
@ -1058,8 +1058,14 @@ SDL_bool SDL_HIDAPI_ShouldIgnoreDevice(int bus, Uint16 vendor_id, Uint16 product
|
||||||
/* See if there are any devices we should skip in enumeration */
|
/* See if there are any devices we should skip in enumeration */
|
||||||
if (SDL_hidapi_only_controllers && usage_page) {
|
if (SDL_hidapi_only_controllers && usage_page) {
|
||||||
if (vendor_id == USB_VENDOR_VALVE) {
|
if (vendor_id == USB_VENDOR_VALVE) {
|
||||||
/* Ignore the USB mouse/keyboard interface on Steam Controllers */
|
/* Ignore the mouse/keyboard interface on Steam Controllers */
|
||||||
if (bus == HID_API_BUS_USB &&
|
if (
|
||||||
|
#ifdef __WIN32__
|
||||||
|
/* Check the usage page and usage on both USB and Bluetooth */
|
||||||
|
#else
|
||||||
|
/* Only check the usage page and usage on USB */
|
||||||
|
bus == HID_API_BUS_USB &&
|
||||||
|
#endif
|
||||||
usage_page == USB_USAGEPAGE_GENERIC_DESKTOP &&
|
usage_page == USB_USAGEPAGE_GENERIC_DESKTOP &&
|
||||||
(usage == USB_USAGE_GENERIC_KEYBOARD || usage == USB_USAGE_GENERIC_MOUSE)) {
|
(usage == USB_USAGE_GENERIC_KEYBOARD || usage == USB_USAGE_GENERIC_MOUSE)) {
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue