Add an option to disable in-stream GUI

This commit is contained in:
Patrick Nicolas
2025-08-11 10:44:44 +02:00
parent e7b218bfb6
commit 9725ae7fc0
5 changed files with 20 additions and 2 deletions
+4
View File
@@ -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);
+2
View File
@@ -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
{
+7
View File
@@ -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
}
+5 -2
View File
@@ -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;
+2
View File
@@ -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;