Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Vindicus999
2025-06-22 11:11:53 +00:00
5 changed files with 43 additions and 113 deletions
+19 -16
View File
@@ -131,7 +131,7 @@ static std::vector<interaction_profile> interaction_profiles{
"/user/hand/right/input/thumbrest/touch",
}},
interaction_profile{
" /interaction_profiles/facebook/touch_controller_pro",
"/interaction_profiles/facebook/touch_controller_pro",
{"XR_FB_touch_controller_pro"},
{
"/user/hand/left/output/haptic",
@@ -185,7 +185,7 @@ static std::vector<interaction_profile> interaction_profiles{
"/user/hand/right/input/thumb_fb/proximity_fb",
}},
interaction_profile{
" /interaction_profiles/meta/touch_pro_controller",
"/interaction_profiles/meta/touch_pro_controller",
{"XR_VERSION_1_1"},
{
"/user/hand/left/output/haptic",
@@ -241,7 +241,7 @@ static std::vector<interaction_profile> interaction_profiles{
}},
interaction_profile{
" /interaction_profiles/meta/touch_controller_plus",
"/interaction_profiles/meta/touch_controller_plus",
{"XR_META_touch_controller_plus"},
{
"/user/hand/left/output/haptic",
@@ -289,7 +289,7 @@ static std::vector<interaction_profile> interaction_profiles{
}},
interaction_profile{
" /interaction_profiles/meta/touch_plus_controller",
"/interaction_profiles/meta/touch_plus_controller",
{"XR_VERSION_1_1"},
{
"/user/hand/left/output/haptic",
@@ -999,20 +999,23 @@ void application::initialize_actions()
for (const scene::suggested_binding & j: i->bindings)
{
// Skip unsupported profiles
if (!suggested_bindings.contains(j.profile_name))
continue;
std::vector<XrActionSuggestedBinding> & xr_bindings = suggested_bindings[j.profile_name];
for (const scene::action_binding & k: j.paths)
for (const auto & profile: j.profile_names)
{
XrAction a = i->actions_by_name[k.action_name].first;
assert(a != XR_NULL_HANDLE);
// Skip unsupported profiles
if (!suggested_bindings.contains(profile))
continue;
xr_bindings.push_back(XrActionSuggestedBinding{
.action = a,
.binding = string_to_path(k.input_source)});
std::vector<XrActionSuggestedBinding> & xr_bindings = suggested_bindings[profile];
for (const scene::action_binding & k: j.paths)
{
XrAction a = i->actions_by_name[k.action_name].first;
assert(a != XR_NULL_HANDLE);
xr_bindings.push_back(XrActionSuggestedBinding{
.action = a,
.binding = string_to_path(k.input_source)});
}
}
}
}
+1 -1
View File
@@ -43,7 +43,7 @@ public:
struct suggested_binding
{
std::string profile_name;
std::vector<std::string> profile_names;
std::vector<action_binding> paths;
};
+12 -72
View File
@@ -1267,7 +1267,17 @@ scene::meta & scenes::lobby::get_meta_scene()
},
.bindings = {
suggested_binding{
"/interaction_profiles/oculus/touch_controller",
{
"/interaction_profiles/oculus/touch_controller",
"/interaction_profiles/facebook/touch_controller_pro",
"/interaction_profiles/meta/touch_pro_controller",
"/interaction_profiles/meta/touch_controller_plus",
"/interaction_profiles/meta/touch_plus_controller",
"/interaction_profiles/bytedance/pico_neo3_controller",
"/interaction_profiles/bytedance/pico4_controller",
"/interaction_profiles/bytedance/pico4s_controller",
"/interaction_profiles/htc/vive_focus3_controller",
},
{
{"left_aim", "/user/hand/left/input/aim/pose"},
{"left_trigger", "/user/hand/left/input/trigger/value"},
@@ -1285,79 +1295,9 @@ scene::meta & scenes::lobby::get_meta_scene()
},
},
suggested_binding{
"/interaction_profiles/bytedance/pico_neo3_controller",
{
{"left_aim", "/user/hand/left/input/aim/pose"},
{"left_trigger", "/user/hand/left/input/trigger/value"},
{"left_squeeze", "/user/hand/left/input/squeeze/value"},
{"left_scroll", "/user/hand/left/input/thumbstick"},
{"left_haptic", "/user/hand/left/output/haptic"},
{"right_aim", "/user/hand/right/input/aim/pose"},
{"right_trigger", "/user/hand/right/input/trigger/value"},
{"right_squeeze", "/user/hand/right/input/squeeze/value"},
{"right_scroll", "/user/hand/right/input/thumbstick"},
{"right_haptic", "/user/hand/right/output/haptic"},
{"recenter_left", "/user/hand/left/input/x/click"},
{"recenter_right", "/user/hand/right/input/a/click"},
"/interaction_profiles/khr/simple_controller",
},
},
suggested_binding{
"/interaction_profiles/bytedance/pico4_controller",
{
{"left_aim", "/user/hand/left/input/aim/pose"},
{"left_trigger", "/user/hand/left/input/trigger/value"},
{"left_squeeze", "/user/hand/left/input/squeeze/value"},
{"left_scroll", "/user/hand/left/input/thumbstick"},
{"left_haptic", "/user/hand/left/output/haptic"},
{"right_aim", "/user/hand/right/input/aim/pose"},
{"right_trigger", "/user/hand/right/input/trigger/value"},
{"right_squeeze", "/user/hand/right/input/squeeze/value"},
{"right_scroll", "/user/hand/right/input/thumbstick"},
{"right_haptic", "/user/hand/right/output/haptic"},
{"recenter_left", "/user/hand/left/input/x/click"},
{"recenter_right", "/user/hand/right/input/a/click"},
},
},
suggested_binding{
"/interaction_profiles/bytedance/pico4s_controller",
{
{"left_aim", "/user/hand/left/input/aim/pose"},
{"left_trigger", "/user/hand/left/input/trigger/value"},
{"left_squeeze", "/user/hand/left/input/squeeze/value"},
{"left_scroll", "/user/hand/left/input/thumbstick"},
{"left_haptic", "/user/hand/left/output/haptic"},
{"right_aim", "/user/hand/right/input/aim/pose"},
{"right_trigger", "/user/hand/right/input/trigger/value"},
{"right_squeeze", "/user/hand/right/input/squeeze/value"},
{"right_scroll", "/user/hand/right/input/thumbstick"},
{"right_haptic", "/user/hand/right/output/haptic"},
{"recenter_left", "/user/hand/left/input/x/click"},
{"recenter_right", "/user/hand/right/input/a/click"},
},
},
suggested_binding{
"/interaction_profiles/htc/vive_focus3_controller",
{
{"left_aim", "/user/hand/left/input/aim/pose"},
{"left_trigger", "/user/hand/left/input/trigger/value"},
{"left_squeeze", "/user/hand/left/input/squeeze/value"},
{"left_scroll", "/user/hand/left/input/thumbstick"},
{"left_haptic", "/user/hand/left/output/haptic"},
{"right_aim", "/user/hand/right/input/aim/pose"},
{"right_trigger", "/user/hand/right/input/trigger/value"},
{"right_squeeze", "/user/hand/right/input/squeeze/value"},
{"right_scroll", "/user/hand/right/input/thumbstick"},
{"right_haptic", "/user/hand/right/output/haptic"},
{"recenter_left", "/user/hand/left/input/x/click"},
{"recenter_right", "/user/hand/right/input/a/click"},
},
},
suggested_binding{
"/interaction_profiles/khr/simple_controller",
{
{"left_aim", "/user/hand/left/input/aim/pose"},
{"left_trigger", "/user/hand/left/input/select/click"},
+11 -21
View File
@@ -1230,35 +1230,25 @@ scene::meta & scenes::stream::get_meta_scene()
},
.bindings = {
suggested_binding{
"/interaction_profiles/oculus/touch_controller",
{
"/interaction_profiles/oculus/touch_controller",
"/interaction_profiles/facebook/touch_controller_pro",
"/interaction_profiles/meta/touch_pro_controller",
"/interaction_profiles/meta/touch_controller_plus",
"/interaction_profiles/meta/touch_plus_controller",
"/interaction_profiles/bytedance/pico_neo3_controller",
"/interaction_profiles/bytedance/pico4_controller",
"/interaction_profiles/htc/vive_focus3_controller",
},
{
{"plots_toggle_1", "/user/hand/left/input/thumbstick/click"},
{"plots_toggle_2", "/user/hand/right/input/thumbstick/click"},
},
},
suggested_binding{
"/interaction_profiles/bytedance/pico_neo3_controller",
{
{"plots_toggle_1", "/user/hand/left/input/thumbstick/click"},
{"plots_toggle_2", "/user/hand/right/input/thumbstick/click"},
"/interaction_profiles/khr/simple_controller",
},
},
suggested_binding{
"/interaction_profiles/bytedance/pico4_controller",
{
{"plots_toggle_1", "/user/hand/left/input/thumbstick/click"},
{"plots_toggle_2", "/user/hand/right/input/thumbstick/click"},
},
},
suggested_binding{
"/interaction_profiles/htc/vive_focus3_controller",
{
{"plots_toggle_1", "/user/hand/left/input/thumbstick/click"},
{"plots_toggle_2", "/user/hand/right/input/thumbstick/click"},
},
},
suggested_binding{
"/interaction_profiles/khr/simple_controller",
{},
},
},
-3
View File
@@ -27,7 +27,6 @@
#include "wifi_lock.h"
#include "wivrn_client.h"
#include "wivrn_packets.h"
#include "xr/passthrough.h"
#include <mutex>
#include <shared_mutex>
#include <thread>
@@ -104,8 +103,6 @@ private:
std::optional<stream_reprojection> reprojector;
std::optional<xr::passthrough> passthrough;
vk::raii::Fence fence = nullptr;
vk::raii::CommandBuffer command_buffer = nullptr;