joystick: Extract 0x02a9 and 0x0291 PIDs into separate defines.
Cleanup controller list comments block.
This commit is contained in:
committed by
Sam Lantinga
parent
84a0d5f623
commit
43309d38ed
@@ -71,7 +71,7 @@ static SDL_bool HIDAPI_DriverXbox360_IsSupportedDevice(SDL_HIDAPI_Device *device
|
||||
/* This is the NVIDIA Shield controller which doesn't talk Xbox controller protocol */
|
||||
return SDL_FALSE;
|
||||
}
|
||||
if ((vendor_id == USB_VENDOR_MICROSOFT && (product_id == 0x0291 || product_id == 0x0719)) ||
|
||||
if ((vendor_id == USB_VENDOR_MICROSOFT && (product_id == USB_PRODUCT_XBOX360_WIRELESS_RECEIVER_THIRDPARTY2 || product_id == USB_PRODUCT_XBOX360_WIRELESS_RECEIVER)) ||
|
||||
(type == SDL_GAMEPAD_TYPE_XBOX360 && interface_protocol == XB360W_IFACE_PROTOCOL)) {
|
||||
/* This is the wireless dongle, which talks a different protocol */
|
||||
return SDL_FALSE;
|
||||
|
||||
@@ -65,7 +65,7 @@ static SDL_bool HIDAPI_DriverXbox360W_IsSupportedDevice(SDL_HIDAPI_Device *devic
|
||||
{
|
||||
const int XB360W_IFACE_PROTOCOL = 129; /* Wireless */
|
||||
|
||||
if ((vendor_id == USB_VENDOR_MICROSOFT && (product_id == 0x0291 || product_id == 0x02a9 || product_id == 0x0719) && interface_protocol == 0) ||
|
||||
if ((vendor_id == USB_VENDOR_MICROSOFT && (product_id == USB_PRODUCT_XBOX360_WIRELESS_RECEIVER_THIRDPARTY2 || product_id == USB_PRODUCT_XBOX360_WIRELESS_RECEIVER_THIRDPARTY1 || product_id == USB_PRODUCT_XBOX360_WIRELESS_RECEIVER) && interface_protocol == 0) ||
|
||||
(type == SDL_GAMEPAD_TYPE_XBOX360 && interface_protocol == XB360W_IFACE_PROTOCOL)) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user