genesys: Fix bcdDevice filtering

merge-requests/213/head^2
Povilas Kanapickas 2020-04-09 23:50:48 +03:00
rodzic bb318cf8f3
commit 0d1542cbe6
2 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -4802,8 +4802,9 @@ const UsbDeviceEntry& get_matching_usb_dev(std::uint16_t vendor_id, std::uint16_
}
}
throw SaneException("vendor 0x%x product 0x%x is not supported by this backend",
vendor_id, product_id);
throw SaneException("vendor 0x%x product 0x%x (bcdDevice 0x%x) "
"is not supported by this backend",
vendor_id, product_id, bcd_device);
}
static Genesys_Device* attach_usb_device(const char* devname,

Wyświetl plik

@ -196,8 +196,11 @@ public:
return false;
if (product_ != product_id)
return false;
if (bcd_device_ != BCD_DEVICE_NOT_SET && bcd_device_ != bcd_device)
if (bcd_device_ != BCD_DEVICE_NOT_SET && bcd_device != BCD_DEVICE_NOT_SET &&
bcd_device_ != bcd_device)
{
return false;
}
return true;
}