The open source OpenXR runtime
0
fork

Configure Feed

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

d/ulv2: Convert Ultraleap driver create function to helper

authored by

Moses Turner and committed by
Jakob Bornecrantz
5c18f83e 833787c4

+6 -22
+4 -9
src/xrt/drivers/ultraleap_v2/ulv2_driver.cpp
··· 379 379 u_device_free(&ulv2d->base); 380 380 } 381 381 382 - int 383 - ulv2_found(struct xrt_prober *xp, 384 - struct xrt_prober_device **devices, 385 - size_t device_count, 386 - size_t index, 387 - cJSON *attached_data, 388 - struct xrt_device **out_xdev) 382 + xrt_result_t 383 + ulv2_create_device(struct xrt_device **out_xdev) 389 384 { 390 385 enum u_device_alloc_flags flags = U_DEVICE_ALLOC_NO_FLAGS; 391 386 ··· 444 439 445 440 out_xdev[0] = &ulv2d->base; 446 441 447 - return 1; 442 + return XRT_SUCCESS; 448 443 449 444 cleanup: 450 445 ulv2_device_destroy(&ulv2d->base); 451 - return 0; 446 + return XRT_ERROR_DEVICE_CREATION_FAILED; 452 447 } 453 448 454 449 } // extern "C"
+2 -8
src/xrt/drivers/ultraleap_v2/ulv2_interface.h
··· 35 35 * @ingroup drv_ulv2 36 36 * @see xrt_prober_found_func_t 37 37 */ 38 - int 39 - ulv2_found(struct xrt_prober *xp, 40 - struct xrt_prober_device **devices, 41 - size_t device_count, 42 - size_t index, 43 - cJSON *attached_data, 44 - struct xrt_device **out_xdev); 45 - 38 + xrt_result_t 39 + ulv2_create_device(struct xrt_device **out_xdev); 46 40 #ifdef __cplusplus 47 41 } 48 42 #endif
-5
src/xrt/targets/common/target_lists.c
··· 146 146 {HDK_VID, HDK_PID, hdk_found, "OSVR HDK", "osvr"}, 147 147 #endif // XRT_BUILD_DRIVER_HDK 148 148 149 - 150 - #ifdef XRT_BUILD_DRIVER_ULV2 151 - {ULV2_VID, ULV2_PID, ulv2_found, "Leap Motion Controller", "ulv2"}, 152 - #endif 153 - 154 149 #ifdef XRT_BUILD_DRIVER_DEPTHAI 155 150 {DEPTHAI_VID, DEPTHAI_PID, depthai_3dof_device_found, "DepthAI Device as Head Tracker", "depthai"}, 156 151 #endif