Move *_supported into xr::system

This commit is contained in:
Patrick Nicolas
2025-08-20 22:07:08 +02:00
parent d2ea30e70f
commit 68edc66fb7
12 changed files with 76 additions and 66 deletions
+4 -4
View File
@@ -926,7 +926,7 @@ void scenes::lobby::gui_settings()
imgui_ctx->vibrate_on_hover();
}
auto body_tracker = xr::body_tracker_supported(instance, system);
auto body_tracker = system.body_tracker_supported();
{
ImGui::BeginDisabled(body_tracker == xr::body_tracker_type::none);
bool enabled = config.check_feature(feature::body_tracking);
@@ -976,7 +976,7 @@ void scenes::lobby::gui_settings()
ImGui::EndDisabled();
}
ImGui::BeginDisabled(passthrough_supported == xr::system::passthrough_type::no_passthrough);
ImGui::BeginDisabled(system.passthrough_supported() == xr::passthrough_type::none);
if (ImGui::Checkbox(_S("Enable video passthrough in lobby"), &config.passthrough_enabled))
{
setup_passthrough();
@@ -1310,7 +1310,7 @@ void scenes::lobby::gui_first_run()
item{
.f = feature::body_tracking,
.text = _S("Enable body tracking?"),
.supported = xr::body_tracker_supported(instance, system) != xr::body_tracker_type::none,
.supported = system.body_tracker_supported() != xr::body_tracker_type::none,
},
};
@@ -1730,7 +1730,7 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
});
}
if (xr::body_tracker_supported(instance, system) != xr::body_tracker_type::none)
if (system.body_tracker_supported() != xr::body_tracker_type::none)
{
items.push_back({
.f = feature::body_tracking,
+3 -3
View File
@@ -254,7 +254,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
if (config.check_feature(feature::face_tracking))
{
switch (xr::face_tracker_supported(self->instance, self->system))
switch (self->system.face_tracker_supported())
{
case xr::face_tracker_type::none:
info.face_tracking = from_headset::face_type::none;
@@ -272,7 +272,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
info.num_generic_trackers = 0;
if (config.check_feature(feature::body_tracking))
{
switch (xr::body_tracker_supported(self->instance, self->system))
switch (self->system.body_tracker_supported())
{
case xr::body_tracker_type::none:
break;
@@ -289,7 +289,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
}
info.palm_pose = application::space(xr::spaces::palm_left) or application::space(xr::spaces::palm_right);
info.passthrough = self->system.passthrough_supported() != xr::system::passthrough_type::no_passthrough;
info.passthrough = self->system.passthrough_supported() != xr::passthrough_type::none;
info.system_name = std::string(self->system.properties().systemName);
audio::get_audio_description(info);