Use VID/PID detection for PS3Eye (#1977)

This commit is contained in:
Banks T
2019-10-24 23:28:21 -04:00
committed by Peter Johnson
parent a3820bbdfa
commit 2a76c996eb

View File

@@ -1192,8 +1192,14 @@ void UsbCameraImpl::SetQuirks() {
wpi::StringRef desc = GetDescription(descbuf);
m_lifecam_exposure =
desc.endswith("LifeCam HD-3000") || desc.endswith("LifeCam Cinema (TM)");
m_ps3eyecam_exposure =
desc.endswith("Camera-B4.04.27.1") || desc.endswith("Camera-B4.09.24.1");
int deviceNum = GetDeviceNum(m_path.c_str());
if (deviceNum >= 0) {
int vendorId, productId;
if (GetVendorProduct(deviceNum, &vendorId, &productId)) {
m_ps3eyecam_exposure = vendorId == 0x2000 && productId == 0x0145;
}
}
}
void UsbCameraImpl::SetProperty(int property, int value, CS_Status* status) {