Only setup passthrough if requested

This commit is contained in:
Patrick Nicolas
2024-04-12 14:53:22 +02:00
parent 5d91bf0763
commit 8ebd6ae7f3
3 changed files with 12 additions and 0 deletions
+9
View File
@@ -762,7 +762,16 @@ void scenes::lobby::on_focused()
{
about_picture = imgui_ctx->load_texture("wivrn.png");
}
setup_passthrough();
}
void scenes::lobby::setup_passthrough()
{
if (not passthrough_enabled)
{
passthrough.emplace<xr::passthrough_fb>();
return;
}
if (passthrough_supported != xr::system::passthrough_type::no_passthrough)
{
if (utils::contains(system.environment_blend_modes(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO), XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND))