Kristian Sloth Lauszus 2015-06-10 22:47:03 +02:00
parent 67e64a0825
commit ba8bb3cae8
2 changed files with 7 additions and 5 deletions

View file

@ -93,7 +93,7 @@ uint8_t XBOXUSB::Init(uint8_t parent, uint8_t port, bool lowspeed) {
VID = udd->idVendor; VID = udd->idVendor;
PID = udd->idProduct; PID = udd->idProduct;
if(VID != XBOX_VID && VID != MADCATZ_VID && VID != JOYTECH_VID && VID != GAMESTOP_VID) // Check VID if(VID != XBOX_VID && VID != MADCATZ_VID && VID != MADCATZ_VID2 && VID != JOYTECH_VID && VID != GAMESTOP_VID) // Check VID
goto FailUnknownDevice; goto FailUnknownDevice;
if(PID == XBOX_WIRELESS_PID) { if(PID == XBOX_WIRELESS_PID) {
#ifdef DEBUG_USB_HOST #ifdef DEBUG_USB_HOST
@ -105,7 +105,7 @@ uint8_t XBOXUSB::Init(uint8_t parent, uint8_t port, bool lowspeed) {
Notify(PSTR("\r\nThis library only supports Xbox 360 controllers via USB"), 0x80); Notify(PSTR("\r\nThis library only supports Xbox 360 controllers via USB"), 0x80);
#endif #endif
goto FailUnknownDevice; goto FailUnknownDevice;
} else if(PID != XBOX_WIRED_PID && PID != MADCATZ_WIRED_PID && PID != GAMESTOP_WIRED_PID && PID != AFTERGLOW_WIRED_PID && PID != JOYTECH_WIRED_PID) // Check PID } else if(PID != XBOX_WIRED_PID && PID != MADCATZ_WIRED_PID && PID != MADCATZ_WIRED_PID2 && PID != GAMESTOP_WIRED_PID && PID != AFTERGLOW_WIRED_PID && PID != JOYTECH_WIRED_PID) // Check PID
goto FailUnknownDevice; goto FailUnknownDevice;
// Allocate new address according to device class // Allocate new address according to device class

View file

@ -32,7 +32,8 @@
// PID and VID of the different devices // PID and VID of the different devices
#define XBOX_VID 0x045E // Microsoft Corporation #define XBOX_VID 0x045E // Microsoft Corporation
#define MADCATZ_VID 0x1BAD // For unofficial Mad Catz controllers #define MADCATZ_VID 0x0738 // For unofficial Mad Catz controllers
#define MADCATZ_VID2 0x1BAD // For unofficial Mad Catz controllers
#define JOYTECH_VID 0x162E // For unofficial Joytech controllers #define JOYTECH_VID 0x162E // For unofficial Joytech controllers
#define GAMESTOP_VID 0x0E6F // Gamestop controller #define GAMESTOP_VID 0x0E6F // Gamestop controller
@ -40,7 +41,8 @@
#define XBOX_WIRELESS_PID 0x028F // Wireless controller only support charging #define XBOX_WIRELESS_PID 0x028F // Wireless controller only support charging
#define XBOX_WIRELESS_RECEIVER_PID 0x0719 // Microsoft Wireless Gaming Receiver #define XBOX_WIRELESS_RECEIVER_PID 0x0719 // Microsoft Wireless Gaming Receiver
#define XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID 0x0291 // Third party Wireless Gaming Receiver #define XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID 0x0291 // Third party Wireless Gaming Receiver
#define MADCATZ_WIRED_PID 0xF016 // Mad Catz wired controller #define MADCATZ_WIRED_PID 0x4716 // Mad Catz wired controller
#define MADCATZ_WIRED_PID2 0xF016 // Mad Catz wired controller
#define JOYTECH_WIRED_PID 0xBEEF // For Joytech wired controller #define JOYTECH_WIRED_PID 0xBEEF // For Joytech wired controller
#define GAMESTOP_WIRED_PID 0x0401 // Gamestop wired controller #define GAMESTOP_WIRED_PID 0x0401 // Gamestop wired controller
#define AFTERGLOW_WIRED_PID 0x0213 // Afterglow wired controller - it uses the same VID as a Gamestop controller #define AFTERGLOW_WIRED_PID 0x0213 // Afterglow wired controller - it uses the same VID as a Gamestop controller
@ -101,7 +103,7 @@ public:
* @return Returns true if the device's VID and PID matches this driver. * @return Returns true if the device's VID and PID matches this driver.
*/ */
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) { virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
return ((vid == XBOX_VID || vid == MADCATZ_VID || vid == JOYTECH_VID || vid == GAMESTOP_VID) && (pid == XBOX_WIRED_PID || pid == MADCATZ_WIRED_PID || pid == GAMESTOP_WIRED_PID || pid == AFTERGLOW_WIRED_PID || pid == JOYTECH_WIRED_PID)); return ((vid == XBOX_VID || vid == MADCATZ_VID || vid == MADCATZ_VID2 || vid == JOYTECH_VID || vid == GAMESTOP_VID) && (pid == XBOX_WIRED_PID || pid == MADCATZ_WIRED_PID || pid == MADCATZ_WIRED_PID2 || pid == GAMESTOP_WIRED_PID || pid == AFTERGLOW_WIRED_PID || pid == JOYTECH_WIRED_PID));
}; };
/**@}*/ /**@}*/