From 7d11036e29de72740e6fdcdf848ef2d75b420128 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sat, 20 May 2023 20:53:52 +0100 Subject: [PATCH] d/ht: Log if we can not find hand-tracking directory --- src/xrt/drivers/ht/ht_driver.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xrt/drivers/ht/ht_driver.c b/src/xrt/drivers/ht/ht_driver.c index 8975898c5..b5639eddf 100644 --- a/src/xrt/drivers/ht/ht_driver.c +++ b/src/xrt/drivers/ht/ht_driver.c @@ -252,7 +252,13 @@ ht_device_create(struct xrt_frame_context *xfctx, char path[1024] = {0}; - u_file_get_hand_tracking_models_dir(path, ARRAY_SIZE(path)); + int ret = u_file_get_hand_tracking_models_dir(path, ARRAY_SIZE(path)); + if (ret < 0) { + U_LOG_E( + "Could not find any directory with hand-tracking models!\n\t" + "Run ./scripts/get-ht-models.sh or install monado-data package"); + return -1; + } sync = t_hand_tracking_sync_mercury_create(calib, extra_camera_info, path); @@ -262,5 +268,6 @@ ht_device_create(struct xrt_frame_context *xfctx, *out_sinks = &htd->async->sinks; *out_device = &htd->base; + return 0; }