diff --git a/client/configuration.h b/client/configuration.h index 90b5bc30..71792ea1 100644 --- a/client/configuration.h +++ b/client/configuration.h @@ -109,8 +109,13 @@ public: void set_stream_scale(float); float get_stream_scale() const; + uint32_t max_bitrate(bool extended) const + { + return extended ? 800'000'000u : 200'000'000u; + } + uint32_t max_bitrate() const { - return extended_config ? 800'000'000u : 200'000'000u; + return max_bitrate(extended_config); } }; diff --git a/client/constants.h b/client/constants.h index e4ed260e..caddd7f1 100644 --- a/client/constants.h +++ b/client/constants.h @@ -143,4 +143,6 @@ constexpr ImVec2 pin_entry_key_size = {90, 70}; constexpr ImVec2 pin_entry_item_spacing = {10, 10}; constexpr float pin_entry_popup_width = 3 * pin_entry_key_size.x + 2 * pin_entry_item_spacing.x; +constexpr ImColor warn(0xf9, 0x73, 0x06); + } // namespace constants::style diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index b835f477..4118fcb0 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -622,10 +622,16 @@ void scenes::lobby::gui_settings() imgui_ctx->vibrate_on_hover(); if (width * config.resolution_scale > stream_view.maxImageRectWidth or height * config.resolution_scale > stream_view.maxImageRectHeight) { - ImGui::TextColored(ImColor(0xf9, 0x73, 0x06) /*orange*/, ICON_FA_TRIANGLE_EXCLAMATION); + ImGui::TextColored(constants::style::warn, ICON_FA_TRIANGLE_EXCLAMATION); ImGui::SameLine(); ImGui::Text("%s", fmt::format(_F("Resolution larger than {}x{} may not be supported by the headset"), stream_view.maxImageRectWidth, stream_view.maxImageRectHeight).c_str()); } + if (intScale > 15) + { + ImGui::TextColored(constants::style::warn, ICON_FA_TRIANGLE_EXCLAMATION); + ImGui::SameLine(); + ImGui::Text("%s", fmt::format(_cF("resolution is higher than recommended", "Recommended maximum is {}%"), 150).c_str()); + } } // foveation @@ -658,6 +664,12 @@ void scenes::lobby::gui_settings() "improving latency, power efficiency and quality.")); } imgui_ctx->vibrate_on_hover(); + if (intval < 30 / step) + { + ImGui::TextColored(constants::style::warn, ICON_FA_TRIANGLE_EXCLAMATION); + ImGui::SameLine(); + ImGui::Text("%s", fmt::format(_cF("foveation is lower than recommended", "Recommended minimum is {}%"), 30).c_str()); + } } { @@ -734,6 +746,12 @@ void scenes::lobby::gui_settings() config.save(); } imgui_ctx->vibrate_on_hover(); + if (config.bitrate_bps > config.max_bitrate(false)) + { + ImGui::TextColored(constants::style::warn, ICON_FA_TRIANGLE_EXCLAMATION); + ImGui::SameLine(); + ImGui::Text("%s", fmt::format(_cF("bitrate value is higher than recommended", "Recommended maximum is {}Mbit/s"), config.max_bitrate(false) / mb).c_str()); + } } if (instance.has_extension(XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME))