mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-05 13:28:16 +00:00
d/qwerty: Fix tracking overrides and correct multi typo
This commit is contained in:
parent
e561d312f6
commit
f70752aeda
|
@ -226,8 +226,8 @@ multi_create_tracking_override(enum xrt_tracking_override_type override_type,
|
|||
d->base = *tracking_override_target;
|
||||
|
||||
// but take orientation and position tracking capabilities from tracker
|
||||
d->base.orientation_tracking_supported = tracking_override_target->orientation_tracking_supported;
|
||||
d->base.position_tracking_supported = tracking_override_target->position_tracking_supported;
|
||||
d->base.orientation_tracking_supported = tracking_override_tracker->orientation_tracking_supported;
|
||||
d->base.position_tracking_supported = tracking_override_tracker->position_tracking_supported;
|
||||
|
||||
// because we use the tracking data of the tracker, we use its tracking origin instead
|
||||
d->base.tracking_origin = tracking_override_tracker->tracking_origin;
|
||||
|
|
|
@ -24,8 +24,12 @@ find_qwerty_system(struct xrt_device **xdevs, size_t num_xdevs)
|
|||
if (xdevs[i] == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (strcmp(xdevs[i]->str, QWERTY_HMD_STR) == 0 || strcmp(xdevs[i]->str, QWERTY_LEFT_STR) == 0 ||
|
||||
strcmp(xdevs[i]->str, QWERTY_RIGHT_STR) == 0) {
|
||||
// We check against tracker name instead of device name because the tracking overrides
|
||||
// cause the multi device to have the same names even though they are not qwerty devices.
|
||||
const char *tracker_name = xdevs[i]->tracking_origin->name;
|
||||
if (strcmp(tracker_name, QWERTY_HMD_TRACKER_STR) == 0 ||
|
||||
strcmp(tracker_name, QWERTY_LEFT_TRACKER_STR) == 0 ||
|
||||
strcmp(tracker_name, QWERTY_RIGHT_TRACKER_STR) == 0) {
|
||||
xdev = xdevs[i];
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue