mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
XboxOld: Use VID and PID function check in init
Avoiding duplicating the VID/PID check logic in multiple places
This commit is contained in:
parent
99e01d3a98
commit
ac7c1acd9f
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ uint8_t XBOXOLD::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) || (PID != XBOX_OLD_PID1 && PID != XBOX_OLD_PID2 && PID != XBOX_OLD_PID3 && PID != XBOX_OLD_PID4)) // Check if VID and PID match
|
if(!VIDPIDOK(VID, PID)) // Check if VID and PID match
|
||||||
goto FailUnknownDevice;
|
goto FailUnknownDevice;
|
||||||
|
|
||||||
// Allocate new address according to device class
|
// Allocate new address according to device class
|
||||||
|
|
Loading…
Reference in a new issue