src/joystick/hidapi/SDL_hidapi_xbox360.c
changeset 13571 b2b43ee5f1bf
parent 13568 2c4ec356333e
child 13574 09a0db265f3d
equal deleted inserted replaced
13570:bcbae957f9b1 13571:b2b43ee5f1bf
   242     }
   242     }
   243 }
   243 }
   244 
   244 
   245 #endif /* SDL_JOYSTICK_HIDAPI_WINDOWS_GAMING_INPUT */
   245 #endif /* SDL_JOYSTICK_HIDAPI_WINDOWS_GAMING_INPUT */
   246 
   246 
       
   247 #if defined(__MACOSX__)
   247 static SDL_bool
   248 static SDL_bool
   248 IsBluetoothXboxOneController(Uint16 vendor_id, Uint16 product_id)
   249 IsBluetoothXboxOneController(Uint16 vendor_id, Uint16 product_id)
   249 {
   250 {
   250     /* Check to see if it's the Xbox One S or Xbox One Elite Series 2 in Bluetooth mode */
   251     /* Check to see if it's the Xbox One S or Xbox One Elite Series 2 in Bluetooth mode */
   251     if (vendor_id == USB_VENDOR_MICROSOFT) {
   252     if (vendor_id == USB_VENDOR_MICROSOFT) {
   255             return SDL_TRUE;
   256             return SDL_TRUE;
   256         }
   257         }
   257     }
   258     }
   258     return SDL_FALSE;
   259     return SDL_FALSE;
   259 }
   260 }
       
   261 #endif
   260 
   262 
   261 static SDL_bool
   263 static SDL_bool
   262 HIDAPI_DriverXbox360_IsSupportedDevice(const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol)
   264 HIDAPI_DriverXbox360_IsSupportedDevice(const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol)
   263 {
   265 {
   264     const int XB360W_IFACE_PROTOCOL = 129; /* Wireless */
   266     const int XB360W_IFACE_PROTOCOL = 129; /* Wireless */