You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
OpenXR: change bindings to 'flatten' source paths
This commit is contained in:
@@ -576,20 +576,15 @@ PackedStringArray OpenXRActionMap::get_top_level_paths(const Ref<OpenXRAction> p
|
||||
const OpenXRInteractionProfileMetadata::InteractionProfile *profile = OpenXRInteractionProfileMetadata::get_singleton()->get_profile(ip->get_interaction_profile_path());
|
||||
|
||||
if (profile != nullptr) {
|
||||
for (int j = 0; j < ip->get_binding_count(); j++) {
|
||||
Ref<OpenXRIPBinding> binding = ip->get_binding(j);
|
||||
if (binding->get_action() == p_action) {
|
||||
PackedStringArray paths = binding->get_paths();
|
||||
Vector<Ref<OpenXRIPBinding>> bindings = ip->get_bindings_for_action(p_action);
|
||||
for (const Ref<OpenXRIPBinding> &binding : bindings) {
|
||||
String binding_path = binding->get_binding_path();
|
||||
const OpenXRInteractionProfileMetadata::IOPath *io_path = profile->get_io_path(binding_path);
|
||||
if (io_path != nullptr) {
|
||||
String top_path = io_path->top_level_path;
|
||||
|
||||
for (int k = 0; k < paths.size(); k++) {
|
||||
const OpenXRInteractionProfileMetadata::IOPath *io_path = profile->get_io_path(paths[k]);
|
||||
if (io_path != nullptr) {
|
||||
String top_path = io_path->top_level_path;
|
||||
|
||||
if (!arr.has(top_path)) {
|
||||
arr.push_back(top_path);
|
||||
}
|
||||
}
|
||||
if (!arr.has(top_path)) {
|
||||
arr.push_back(top_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user