Skip to content

Commit b7cd39d

Browse files
committed
Fixed a bug that prevented the project from working on Linux machines...
(It was never able to find the sensor correctrly...)
1 parent 4e91f68 commit b7cd39d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,13 @@ XnStatus XnSensorIO::GetNumOfSensors(XnUInt32* pnNumSensors)
402402
nRetVal = xnUSBIsDevicePresent(XN_SENSOR_VENDOR_ID, XN_SENSOR_2_0_PRODUCT_ID, USB_DEVICE_EXTRA_PARAM, &bIsPresent);
403403
XN_IS_STATUS_OK(nRetVal);
404404
}
405+
406+
if (!bIsPresent)
407+
{
408+
// try searching for a kinect
409+
nRetVal = xnUSBIsDevicePresent(XN_SENSOR_VENDOR_ID_KINECT, XN_SENSOR_KINECT_PRODUCT_ID, USB_DEVICE_EXTRA_PARAM, &bIsPresent);
410+
XN_IS_STATUS_OK(nRetVal);
411+
}
405412

406413
if (bIsPresent == TRUE)
407414
{

0 commit comments

Comments
 (0)