kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Fix bcdDevice filtering
rodzic
bb318cf8f3
commit
0d1542cbe6
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue