From 5e3bb10b0c1bba1e8775534ee721e4abedb17b58 Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Tue, 29 Sep 2026 23:11:00 +0900 Subject: [PATCH] client: instructions when only 1 frame rate is reported --- client/scenes/gui_settings.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/scenes/gui_settings.cpp b/client/scenes/gui_settings.cpp index 0d377e2f..39e9581e 100644 --- a/client/scenes/gui_settings.cpp +++ b/client/scenes/gui_settings.cpp @@ -222,15 +222,19 @@ void settings_video(const settings_context & ctx) auto & default_config = ctx.default_config; const std::string disconnect_tip = ctx.in_game ? _C("tooltip for disabled settings", "Disconnect to change this setting.") : std::string{}; std::vector list; + const auto rates = ctx.session.get_refresh_rates(); - if (const auto rates = ctx.session.get_refresh_rates(); not rates.empty()) + if (not rates.empty()) { + const auto system_managed = rates.size() < 2; int default_rate_index = index(rates, default_config.preferred_refresh_rate).value_or(-1) + 1; list.push_back({ .id = "##refresh", .label = _("Refresh rate"), - .description = _("Use 'auto' to select the refresh rate based on measured application performance. May cause flicker when a change happens."), + .description = system_managed + ? _("WiVRn can't directly change the refresh rate on this device. See your device's settings to change the refresh rate.") + : _("Use 'auto' to select the refresh rate based on measured application performance. May cause flicker when a change happens."), .ui = rates.size() < 7 ? ui_kind::segmented : ui_kind::combo, .get_int = [&config, rates] { for (size_t i = 0; i < rates.size(); ++i) @@ -258,6 +262,7 @@ void settings_video(const settings_context & ctx) opts.push_back(fmt::format("{}", int(r))); return opts; }, .default_int = default_rate_index, + .enabled = [system_managed] { return not system_managed; }, }); } @@ -280,7 +285,7 @@ void settings_video(const settings_context & ctx) }); } - if (ctx.instance.has_extension(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME)) + if (rates.size() > 1 && ctx.instance.has_extension(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME)) { list.push_back({ .id = "##spacewarp",