The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/prober: If we can't tell if we can open a device assume yes

+12 -2
+12 -2
src/xrt/state_trackers/prober/p_prober.c
··· 1140 1140 { 1141 1141 XRT_TRACE_MARKER(); 1142 1142 1143 - XRT_MAYBE_UNUSED struct prober *p = (struct prober *)xp; 1144 - XRT_MAYBE_UNUSED struct prober_device *pdev = (struct prober_device *)xpdev; 1143 + struct prober *p = (struct prober *)xp; 1144 + struct prober_device *pdev = (struct prober_device *)xpdev; 1145 + bool has_been_queried = false; 1146 + 1145 1147 #ifdef XRT_HAVE_LIBUSB 1148 + has_been_queried = true; 1146 1149 if (pdev->usb.dev != NULL) { 1147 1150 return p_libusb_can_open(p, pdev); 1148 1151 } 1149 1152 #endif 1153 + 1154 + // No backend compiled in to judge the ability to open the device. 1155 + if (!has_been_queried) { 1156 + P_WARN(p, "Can not tell if '%s' can be opened, assuming yes!", pdev->usb.product); 1157 + return true; 1158 + } 1159 + 1150 1160 //! @todo add more backends 1151 1161 return false; 1152 1162 }