···1// Copyright 2018-2020,2023 Collabora, Ltd.
02// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
···462 if (name == XRT_DEVICE_INVALID) {
463 return false;
464 }
0465 /*
466 * Map xrt_device_name to an interaction profile XrPath.
467- * Set *out_p to an oxr_interaction_profile if bindings for that interaction profile XrPath have been suggested.
000000000000468 */
469 for (uint32_t i = 0; i < ARRAY_SIZE(profile_templates); i++) {
470 if (name == profile_templates[i].name) {
471- if (interaction_profile_find_in_session(log, sess, profile_templates[i].path_cache, out_p)) {
0000000472 return true;
473 }
474 }
···1// Copyright 2018-2020,2023 Collabora, Ltd.
2+// Copyright 2025, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
···463 if (name == XRT_DEVICE_INVALID) {
464 return false;
465 }
466+467 /*
468 * Map xrt_device_name to an interaction profile XrPath.
469+ *
470+ * There might be multiple OpenXR interaction profiles that maps to a
471+ * a single @ref xrt_device_name, so we can't just grab the first one
472+ * that we find and assume that wasn't bound then there isn't an OpenXR
473+ * interaction profile bound for that device name. So we will need to
474+ * keep looping until we find an OpenXR interaction profile, or we run
475+ * out of interaction profiles that the app has suggested.
476+ *
477+ * For XRT_DEVICE_HAND_INTERACTION both the OpenXR hand-interaction
478+ * profiles maps to it, but the app might only provide binding for one.
479+ *
480+ * Set *out_p to an oxr_interaction_profile if bindings for that
481+ * interaction profile XrPath have been suggested.
482 */
483 for (uint32_t i = 0; i < ARRAY_SIZE(profile_templates); i++) {
484 if (name == profile_templates[i].name) {
485+ interaction_profile_find_in_session(log, sess, profile_templates[i].path_cache, out_p);
486+487+ /*
488+ * Keep looping even if the current matching OpenXR
489+ * interaction profile wasn't suggested by the app.
490+ * See comment above.
491+ */
492+ if (*out_p != NULL) {
493 return true;
494 }
495 }