Only setup passthrough if requested
This commit is contained in:
@@ -762,7 +762,16 @@ void scenes::lobby::on_focused()
|
|||||||
{
|
{
|
||||||
about_picture = imgui_ctx->load_texture("wivrn.png");
|
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 (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))
|
if (utils::contains(system.environment_blend_modes(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO), XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND))
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ class lobby : public scene_impl<lobby>
|
|||||||
void gui_about();
|
void gui_about();
|
||||||
void gui_keyboard(ImVec2 size);
|
void gui_keyboard(ImVec2 size);
|
||||||
|
|
||||||
|
void setup_passthrough();
|
||||||
|
|
||||||
void vibrate_on_hover();
|
void vibrate_on_hover();
|
||||||
|
|
||||||
void connect(server_data & data);
|
void connect(server_data & data);
|
||||||
|
|||||||
@@ -382,6 +382,7 @@ void scenes::lobby::gui_settings()
|
|||||||
ImGui::BeginDisabled(passthrough_supported == xr::system::passthrough_type::no_passthrough);
|
ImGui::BeginDisabled(passthrough_supported == xr::system::passthrough_type::no_passthrough);
|
||||||
if (ImGui::Checkbox("Enable video passthrough in lobby", &passthrough_enabled))
|
if (ImGui::Checkbox("Enable video passthrough in lobby", &passthrough_enabled))
|
||||||
{
|
{
|
||||||
|
setup_passthrough();
|
||||||
save_config();
|
save_config();
|
||||||
}
|
}
|
||||||
vibrate_on_hover();
|
vibrate_on_hover();
|
||||||
|
|||||||
Reference in New Issue
Block a user