mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Check if Bluetooth address is set before returning true to a PS3 controller
This commit is contained in:
parent
a340b81100
commit
c58f93dd83
1 changed files with 7 additions and 1 deletions
8
BTD.h
8
BTD.h
|
@ -219,7 +219,13 @@ public:
|
|||
* @return Returns true if the device's VID and PID matches this driver.
|
||||
*/
|
||||
virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid) {
|
||||
return ((vid == PS3_VID || vid == IOGEAR_GBU521_VID) && (pid == PS3_PID || pid == PS3NAVIGATION_PID || pid == PS3MOVE_PID || pid == IOGEAR_GBU521_PID));
|
||||
if (vid == IOGEAR_GBU521_VID && pid == IOGEAR_GBU521_PID)
|
||||
return true;
|
||||
if (my_bdaddr[0] != 0x00 || my_bdaddr[1] != 0x00 || my_bdaddr[2] != 0x00 || my_bdaddr[3] != 0x00 || my_bdaddr[4] != 0x00 || my_bdaddr[5] != 0x00) { // Check if Bluetooth address is set
|
||||
if (vid == PS3_VID && (pid == PS3_PID || pid == PS3NAVIGATION_PID || pid == PS3MOVE_PID))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
/**@}*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue