mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 02:26:16 +00:00
drivers: don't initialize masks_sink if slam is disabled
Co-authored-by: Simon Zeni <simon.zeni@collabora.com>
This commit is contained in:
parent
55bd054ddd
commit
a8eb098e14
|
@ -404,7 +404,7 @@ rift_s_tracker_create(struct xrt_tracking_origin *origin,
|
|||
// Initialize hand tracker
|
||||
struct xrt_slam_sinks *hand_sinks = NULL;
|
||||
struct xrt_device *hand_device = NULL;
|
||||
struct xrt_hand_masks_sink *masks_sink = slam_sinks->hand_masks;
|
||||
struct xrt_hand_masks_sink *masks_sink = slam_sinks ? slam_sinks->hand_masks : NULL;
|
||||
if (t->tracking.hand_enabled) {
|
||||
int hand_status = rift_s_create_hand_tracker(t, xfctx, masks_sink, &hand_sinks, &hand_device);
|
||||
if (hand_status != 0 || hand_sinks == NULL || hand_device == NULL) {
|
||||
|
|
|
@ -1872,7 +1872,7 @@ wmr_hmd_setup_trackers(struct wmr_hmd *wh, struct xrt_slam_sinks *out_sinks, str
|
|||
// Initialize hand tracker
|
||||
struct xrt_slam_sinks *hand_sinks = NULL;
|
||||
struct xrt_device *hand_device = NULL;
|
||||
struct xrt_hand_masks_sink *masks_sink = slam_sinks->hand_masks;
|
||||
struct xrt_hand_masks_sink *masks_sink = slam_sinks ? slam_sinks->hand_masks : NULL;
|
||||
if (wh->tracking.hand_enabled) {
|
||||
int hand_status = wmr_hmd_hand_track(wh, stereo_calib, masks_sink, &hand_sinks, &hand_device);
|
||||
if (hand_status != 0 || hand_sinks == NULL || hand_device == NULL) {
|
||||
|
|
|
@ -385,7 +385,7 @@ valve_index_setup_visual_trackers(struct lighthouse_system *lhs,
|
|||
// Initialize hand tracker
|
||||
struct xrt_slam_sinks *hand_sinks = NULL;
|
||||
struct xrt_device *hand_devices[2] = {NULL};
|
||||
struct xrt_hand_masks_sink *masks_sink = (slam_enabled ? slam_sinks->hand_masks : NULL);
|
||||
struct xrt_hand_masks_sink *masks_sink = slam_sinks ? slam_sinks->hand_masks : NULL;
|
||||
if (hand_enabled) {
|
||||
bool success = valve_index_hand_track( //
|
||||
lhs, //
|
||||
|
|
|
@ -308,7 +308,7 @@ ns_setup_depthai_device(struct ns_builder *nsb,
|
|||
|
||||
#ifdef XRT_BUILD_DRIVER_HANDTRACKING
|
||||
struct xrt_slam_sinks *hand_sinks = NULL;
|
||||
struct xrt_hand_masks_sink *masks_sink = slam_sinks->hand_masks;
|
||||
struct xrt_hand_masks_sink *masks_sink = slam_sinks ? slam_sinks->hand_masks : NULL;
|
||||
|
||||
struct t_camera_extra_info extra_camera_info = {0};
|
||||
|
||||
|
|
Loading…
Reference in a new issue