st/oxr: Use correct device to check for hand tracking support

This commit is contained in:
Jakob Bornecrantz 2022-08-14 14:22:30 +01:00 committed by Jakob Bornecrantz
parent 97874a524a
commit 074121e371

View file

@ -174,11 +174,12 @@ bool
oxr_system_get_hand_tracking_support(struct oxr_logger *log, struct oxr_instance *inst)
{
struct oxr_system *sys = &inst->system;
struct xrt_device *left = GET_XDEV_BY_ROLE(sys, left);
struct xrt_device *right = GET_XDEV_BY_ROLE(sys, right);
struct xrt_device *ht_left = GET_XDEV_BY_ROLE(sys, hand_tracking.left);
struct xrt_device *ht_right = GET_XDEV_BY_ROLE(sys, hand_tracking.right);
bool left_supported = ht_left && ht_left->hand_tracking_supported;
bool right_supported = ht_right && ht_right->hand_tracking_supported;
bool left_supported = left && left->hand_tracking_supported;
bool right_supported = right && right->hand_tracking_supported;
return left_supported || right_supported;
}