xrt: Add msft_hand_interaction path to cache and check func

This commit is contained in:
Christoph Haag 2021-04-01 23:54:17 +02:00 committed by Jakob Bornecrantz
parent 9695e90d95
commit 85ff0dc73c
3 changed files with 5 additions and 0 deletions

View file

@ -136,6 +136,8 @@ oxr_xrSuggestInteractionProfileBindings(XrInstance instance,
func = oxr_verify_valve_index_controller_subpath;
} else if (ip == inst->path_cache.mndx_ball_on_a_stick_controller) {
func = oxr_verify_mndx_ball_on_a_stick_controller_subpath;
} else if (ip == inst->path_cache.msft_hand_interaction) {
func = oxr_verify_microsoft_hand_interaction_subpath;
} else {
return oxr_error(&log, XR_ERROR_PATH_UNSUPPORTED,
"(suggestedBindings->interactionProfile == \"%s\") is not "

View file

@ -234,6 +234,8 @@ oxr_instance_create(struct oxr_logger *log, const XrInstanceCreateInfo *createIn
cache_path(log, inst, "/interaction_profiles/oculus/touch_controller", &inst->path_cache.oculus_touch_controller);
cache_path(log, inst, "/interaction_profiles/valve/index_controller", &inst->path_cache.valve_index_controller);
cache_path(log, inst, "/interaction_profiles/mndx/ball_on_a_stick_controller", &inst->path_cache.mndx_ball_on_a_stick_controller);
cache_path(log, inst, "/interaction_profiles/microsoft/hand_interaction", &inst->path_cache.msft_hand_interaction);
// clang-format on
// fill in our application info - @todo - replicate all createInfo

View file

@ -1184,6 +1184,7 @@ struct oxr_instance
XrPath oculus_touch_controller;
XrPath valve_index_controller;
XrPath mndx_ball_on_a_stick_controller;
XrPath msft_hand_interaction;
} path_cache;
struct