diff --git a/src/xrt/auxiliary/util/u_builders.c b/src/xrt/auxiliary/util/u_builders.c index 35e6591e5..44ec19c42 100644 --- a/src/xrt/auxiliary/util/u_builders.c +++ b/src/xrt/auxiliary/util/u_builders.c @@ -20,12 +20,15 @@ struct xrt_prober_device * u_builder_find_prober_device(struct xrt_prober_device *const *xpdevs, size_t xpdev_count, + uint16_t vendor_id, uint16_t product_id, - uint16_t vendor_id) + enum xrt_bus_type bus_type) { for (size_t i = 0; i < xpdev_count; i++) { struct xrt_prober_device *xpdev = xpdevs[i]; - if (xpdev->product_id != product_id || xpdev->vendor_id != vendor_id) { + if (xpdev->product_id != product_id || // + xpdev->vendor_id != vendor_id || // + xpdev->bus != bus_type) { continue; } diff --git a/src/xrt/auxiliary/util/u_builders.h b/src/xrt/auxiliary/util/u_builders.h index cb4095007..d11140ad1 100644 --- a/src/xrt/auxiliary/util/u_builders.h +++ b/src/xrt/auxiliary/util/u_builders.h @@ -59,8 +59,9 @@ struct u_builder_search_results struct xrt_prober_device * u_builder_find_prober_device(struct xrt_prober_device *const *xpdevs, size_t xpdev_count, + uint16_t vendor_id, uint16_t product_id, - uint16_t vendor_id); + enum xrt_bus_type bus_type); /*! * Find all of the @ref xrt_prober_device that matches any in the given list of diff --git a/src/xrt/targets/common/target_builder_rgb_tracking.c b/src/xrt/targets/common/target_builder_rgb_tracking.c index bdd151323..7ae94e459 100644 --- a/src/xrt/targets/common/target_builder_rgb_tracking.c +++ b/src/xrt/targets/common/target_builder_rgb_tracking.c @@ -230,7 +230,8 @@ rgb_estimate_system(struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp */ #ifdef XRT_BUILD_DRIVER_PSVR - struct xrt_prober_device *psvr = u_builder_find_prober_device(xpdevs, xpdev_count, PSVR_VID, PSVR_PID); + struct xrt_prober_device *psvr = + u_builder_find_prober_device(xpdevs, xpdev_count, PSVR_VID, PSVR_PID, XRT_BUS_TYPE_USB); if (psvr != NULL) { estimate->certain.head = true; } @@ -322,7 +323,8 @@ rgb_open_system(struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp, st struct xrt_device *psmv_purple = NULL; #ifdef XRT_BUILD_DRIVER_PSVR - struct xrt_prober_device *psvr = u_builder_find_prober_device(xpdevs, xpdev_count, PSVR_VID, PSVR_PID); + struct xrt_prober_device *psvr = + u_builder_find_prober_device(xpdevs, xpdev_count, PSVR_VID, PSVR_PID, XRT_BUS_TYPE_USB); if (psvr != NULL) { head = psvr_device_create(build.psvr); }