Commit 01beb749 authored by Thiago Santini's avatar Thiago Santini

Uses product name instead of product ID

Some Pupil Labs cameras apparently ship with non-unique productId.
Using just the product name instead.
parent 75183773
...@@ -87,7 +87,7 @@ void UVCVideoDeviceControl::setSelectedDevice(int index) ...@@ -87,7 +87,7 @@ void UVCVideoDeviceControl::setSelectedDevice(int index)
qWarning() << "uvc_get_device_descriptor" << uvc_strerror(res); qWarning() << "uvc_get_device_descriptor" << uvc_strerror(res);
return; return;
} }
bool selectedDevice = QString::number(desc->idProduct).compare(device) == 0; bool selectedDevice = QString(desc->product).compare(device) == 0;
uvc_free_device_descriptor(desc); uvc_free_device_descriptor(desc);
if (selectedDevice) { if (selectedDevice) {
...@@ -158,7 +158,7 @@ void UVCVideoDeviceControl::updateDevices() ...@@ -158,7 +158,7 @@ void UVCVideoDeviceControl::updateDevices()
UVCVideoDeviceInfo devInfo; UVCVideoDeviceInfo devInfo;
devInfo.first = QString::number(desc->idProduct).toUtf8(); devInfo.first = QString(desc->product).toUtf8();
devInfo.second = QString(desc->product).toUtf8(); devInfo.second = QString(desc->product).toUtf8();
deviceList->append(devInfo); deviceList->append(devInfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment