mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
d/vive: Don't create the hand-tracker ourselves
This commit is contained in:
parent
6b63d473c6
commit
a853022a66
|
@ -265,32 +265,7 @@ init_valve_index(struct xrt_prober *xp,
|
||||||
int out_idx = 0;
|
int out_idx = 0;
|
||||||
|
|
||||||
out_xdevs[out_idx++] = &d->base;
|
out_xdevs[out_idx++] = &d->base;
|
||||||
|
*out_vive_config = &d->config;
|
||||||
#ifdef XRT_BUILD_DRIVER_HANDTRACKING
|
|
||||||
if (debug_get_bool_option_vive_use_handtracking()) {
|
|
||||||
struct t_stereo_camera_calibration *cal = NULL;
|
|
||||||
|
|
||||||
struct xrt_pose head_in_left_cam;
|
|
||||||
// vive_get_stereo_camera_calibration(&ss->hmd->hmd.config, &cal, &head_in_left_cam);
|
|
||||||
vive_get_stereo_camera_calibration(&d->config, &cal, &head_in_left_cam);
|
|
||||||
|
|
||||||
struct xrt_device *ht = ht_device_create_index(xp, cal);
|
|
||||||
if (ht != NULL) { // Returns NULL if there's a problem and the hand tracker can't start. By no means a
|
|
||||||
// fatal error.
|
|
||||||
struct xrt_device *wrap =
|
|
||||||
multi_create_tracking_override(XRT_TRACKING_OVERRIDE_ATTACHED, ht, &d->base,
|
|
||||||
XRT_INPUT_GENERIC_HEAD_POSE, &head_in_left_cam);
|
|
||||||
|
|
||||||
struct xrt_device *two_hands[2];
|
|
||||||
cemu_devices_create(&d->base, wrap, two_hands);
|
|
||||||
out_xdevs[out_idx++] = two_hands[0];
|
|
||||||
out_xdevs[out_idx++] = two_hands[1];
|
|
||||||
}
|
|
||||||
// Don't need it anymore. And it's not even created unless we enter this codepath, which is somewhat
|
|
||||||
// hard.
|
|
||||||
t_stereo_camera_calibration_reference(&cal, NULL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return out_idx;
|
return out_idx;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue