···287287 enum xrt_device_name name,
288288 struct oxr_interaction_profile **out_p)
289289{
290290+ /*
291291+ * Map xrt_device_name to an interaction profile XrPath.
292292+ * Set *out_p to an oxr_interaction_profile if bindings for that interaction profile XrPath have been suggested.
293293+ */
290294#define FIND_PROFILE(PATH) interaction_profile_find(log, inst, inst->path_cache.PATH, out_p)
291295292296 switch (name) {
···332336 return;
333337 }
334338335335- // Does the device directly have a binding profile.
339339+ // Have bindings for this device's interaction profile been suggested?
336340 get_profile_for_device_name(log, inst, xdev->name, out_p);
341341+ if (*out_p != NULL) {
342342+ return;
343343+ }
337344338338- // Find all other binding profile for all device provided profiles.
345345+ // Check if bindings for any of this device's alternative interaction profiles have been suggested.
339346 for (size_t i = 0; i < xdev->binding_profile_count; i++) {
340347 struct xrt_binding_profile *xbp = &xdev->binding_profiles[i];
341348 get_profile_for_device_name(log, inst, xbp->name, out_p);
349349+ if (*out_p != NULL) {
350350+ return;
351351+ }
342352 }
343353}
344354