From a2df807ad43ee12be36a505e358c57910a7e40ed Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Fri, 14 May 2021 21:31:40 +0200 Subject: [PATCH] Added another PID for the Xbox 360 wireless receiver --- XBOXRECV.cpp | 2 +- XBOXRECV.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/XBOXRECV.cpp b/XBOXRECV.cpp index 0ba3b6b0..3620a997 100644 --- a/XBOXRECV.cpp +++ b/XBOXRECV.cpp @@ -89,7 +89,7 @@ uint8_t XBOXRECV::ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed) { VID = udd->idVendor; PID = udd->idProduct; - if((VID != XBOX_VID && VID != MADCATZ_VID && VID != JOYTECH_VID) || (PID != XBOX_WIRELESS_RECEIVER_PID && PID != XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID)) { // Check if it's a Xbox receiver using the Vendor ID and Product ID + if((VID != XBOX_VID && VID != MADCATZ_VID && VID != JOYTECH_VID) || (PID != XBOX_WIRELESS_RECEIVER_PID_1 && PID != XBOX_WIRELESS_RECEIVER_PID_2 && PID != XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID)) { // Check if it's a Xbox receiver using the Vendor ID and Product ID #ifdef DEBUG_USB_HOST Notify(PSTR("\r\nYou'll need a wireless receiver for this libary to work"), 0x80); #endif diff --git a/XBOXRECV.h b/XBOXRECV.h index 4f921465..34047608 100644 --- a/XBOXRECV.h +++ b/XBOXRECV.h @@ -42,7 +42,8 @@ #define MADCATZ_VID 0x1BAD // For unofficial Mad Catz receivers #define JOYTECH_VID 0x162E // For unofficial Joytech controllers -#define XBOX_WIRELESS_RECEIVER_PID 0x0719 // Microsoft Wireless Gaming Receiver +#define XBOX_WIRELESS_RECEIVER_PID_1 0x0719 // Microsoft Wireless Gaming Receiver +#define XBOX_WIRELESS_RECEIVER_PID_2 0x02A9 // Microsoft Wireless Gaming Receiver #define XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID 0x0291 // Third party Wireless Gaming Receiver #define XBOX_MAX_ENDPOINTS 9 @@ -111,7 +112,7 @@ public: * @return Returns true if the device's VID and PID matches this driver. */ virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) { - return ((vid == XBOX_VID || vid == MADCATZ_VID || vid == JOYTECH_VID) && (pid == XBOX_WIRELESS_RECEIVER_PID || pid == XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID)); + return ((vid == XBOX_VID || vid == MADCATZ_VID || vid == JOYTECH_VID) && (pid == XBOX_WIRELESS_RECEIVER_PID_1 || pid == XBOX_WIRELESS_RECEIVER_PID_2 || pid == XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID)); }; /**@}*/