diff --git a/client/scenes/lobby.cpp b/client/scenes/lobby.cpp index e5167c29..3a5b05c9 100644 --- a/client/scenes/lobby.cpp +++ b/client/scenes/lobby.cpp @@ -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(); + 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)) diff --git a/client/scenes/lobby.h b/client/scenes/lobby.h index 65450911..42850258 100644 --- a/client/scenes/lobby.h +++ b/client/scenes/lobby.h @@ -127,6 +127,8 @@ class lobby : public scene_impl void gui_about(); void gui_keyboard(ImVec2 size); + void setup_passthrough(); + void vibrate_on_hover(); void connect(server_data & data); diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index 6a77c556..894414da 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -382,6 +382,7 @@ void scenes::lobby::gui_settings() ImGui::BeginDisabled(passthrough_supported == xr::system::passthrough_type::no_passthrough); if (ImGui::Checkbox("Enable video passthrough in lobby", &passthrough_enabled)) { + setup_passthrough(); save_config(); } vibrate_on_hover();