mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
st/oxr: Fix running when only one hand suports hand tracking
This commit is contained in:
parent
08e39a1a0e
commit
e7f82c297a
|
@ -298,11 +298,12 @@ oxr_hand_tracker_create(struct oxr_logger *log,
|
|||
hand_tracker->hand = createInfo->hand;
|
||||
hand_tracker->hand_joint_set = createInfo->handJointSet;
|
||||
|
||||
//! @todo: Implement choice when more than one device has hand tracking
|
||||
//! @todo: move hand tracking device selection to oxr_system.
|
||||
// if no xdev with hand tracking is found, create hand tracker without xdev.
|
||||
for (uint32_t i = 0; i < sess->sys->num_xdevs; i++) {
|
||||
struct xrt_device *xdev = sess->sys->xdevs[i];
|
||||
|
||||
if (!xdev->hand_tracking_supported) {
|
||||
if (!xdev || !xdev->hand_tracking_supported) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -2155,6 +2155,11 @@ oxr_session_hand_joints(struct oxr_logger *log,
|
|||
XrHandJointVelocitiesEXT *vel =
|
||||
OXR_GET_OUTPUT_FROM_CHAIN(locations, XR_TYPE_HAND_JOINT_VELOCITIES_EXT, XrHandJointVelocitiesEXT);
|
||||
|
||||
if (hand_tracker->xdev == NULL) {
|
||||
locations->isActive = false;
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
struct xrt_device *xdev = hand_tracker->xdev;
|
||||
enum xrt_input_name name = hand_tracker->input_name;
|
||||
|
||||
|
|
Loading…
Reference in a new issue