diff --git a/client/configuration.cpp b/client/configuration.cpp index abe7f15e..ea0ec8d8 100644 --- a/client/configuration.cpp +++ b/client/configuration.cpp @@ -214,6 +214,9 @@ configuration::configuration(xr::system & system) if (auto val = root["resolution_scale"]; val.is_double()) resolution_scale = val.get_double(); + if (auto val = root["enable_stream_gui"]; val.is_bool()) + enable_stream_gui = val.get_bool(); + if (auto val = root["sgsr"]; val.is_object()) parse_sgsr_options(val.get_object()); @@ -365,6 +368,7 @@ void configuration::save() json << ",\"mic_unprocessed_audio\":" << std::boolalpha << mic_unprocessed_audio; json << ",\"fb_lower_body\":" << std::boolalpha << fb_lower_body; json << ",\"fb_hip\":" << std::boolalpha << fb_hip; + json << ",\"enable_stream_gui\":" << std::boolalpha << enable_stream_gui; for (auto & [key, value]: features) json << "," << key << ":" << std::boolalpha << value; json << ",\"virtual_keyboard_layout\":" << json_string(virtual_keyboard_layout); diff --git a/client/configuration.h b/client/configuration.h index 8d34faae..a0f6ecad 100644 --- a/client/configuration.h +++ b/client/configuration.h @@ -56,6 +56,8 @@ public: bool fb_lower_body = false; bool fb_hip = true; + bool enable_stream_gui = true; + // Snapdragon Game Super Resolution struct sgsr_settings { diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index 8585fed5..845bf42a 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -990,6 +990,13 @@ void scenes::lobby::gui_settings() imgui_ctx->tooltip(_("This feature is not supported by your headset")); ImGui::EndDisabled(); + { + ImGui::Checkbox(_S("Enable in-stream window"), &config.enable_stream_gui); + imgui_ctx->vibrate_on_hover(); + if (ImGui::IsItemHovered()) + imgui_ctx->tooltip(_("Enables the configuration window to be shown while the game is streaming.\nIf enabled, the window is activated by pressing both thumbsticks.")); + } + ImGui::PopStyleVar(); // ImGuiStyleVar_ItemSpacing } diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp index aa33ba7b..7dd945a3 100644 --- a/client/scenes/stream.cpp +++ b/client/scenes/stream.cpp @@ -465,8 +465,11 @@ void scenes::stream::on_focused() swapchain_imgui, std::vector{vp}); - plots_toggle_1 = get_action("plots_toggle_1").first; - plots_toggle_2 = get_action("plots_toggle_2").first; + if (application::get_config().enable_stream_gui) + { + plots_toggle_1 = get_action("plots_toggle_1").first; + plots_toggle_2 = get_action("plots_toggle_2").first; + } recenter_left = get_action("recenter_left").first; recenter_right = get_action("recenter_right").first; foveation_pitch = get_action("foveation_pitch").first; diff --git a/client/scenes/stream_gui.cpp b/client/scenes/stream_gui.cpp index 975445a1..1164543f 100644 --- a/client/scenes/stream_gui.cpp +++ b/client/scenes/stream_gui.cpp @@ -615,6 +615,8 @@ static glm::vec4 compute_ray_limits(const XrPosef & pose, float margin = 0) void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicted_display_period) { + if (not(plots_toggle_1 and plots_toggle_2)) + return; bool interactable = true; XrSpace world_space = application::space(xr::spaces::world); auto views = session.locate_views(viewconfig, predicted_display_time, world_space).second; diff --git a/locale/es/wivrn.po b/locale/es/wivrn.po index e5532cce..39f4673a 100644 --- a/locale/es/wivrn.po +++ b/locale/es/wivrn.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: WiVRn 0.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-08-04 15:49+0200\n" -"PO-Revision-Date: 2025-08-02 00:41+0200\n" +"PO-Revision-Date: 2025-08-10 17:11+0200\n" "Last-Translator: Álvaro De Quinta \n" "Language-Team: Spanish\n" "Language: es\n" @@ -470,7 +470,7 @@ msgid "" "Press the grip button or put your palm up\n" "to move the main window" msgstr "" -"Pulsa el botón de agarre o pon tu palma apuntando hacia arriba\n" +"Pulsa el botón de agarre o pon tu palma hacia arriba\n" "para mover la ventana principal" #: client/scenes/lobby_gui.cpp:2005 @@ -591,7 +591,7 @@ msgstr "Estadísticas" #: client/scenes/stream_gui.cpp:802 msgid "Statistics overlay" -msgstr "Superposición de las estadísticas" +msgstr "Superponer estadísticas" #: client/scenes/stream_gui.cpp:805 msgid "Compact view"