diff --git a/client/scenes/lobby.cpp b/client/scenes/lobby.cpp index 9d6572ec..33995a23 100644 --- a/client/scenes/lobby.cpp +++ b/client/scenes/lobby.cpp @@ -648,6 +648,7 @@ void scenes::lobby::on_focused() recenter_gui = true; auto views = system.view_configuration_views(viewconfig); + stream_view = override_view(views[0], guess_model()); uint32_t width = views[0].recommendedImageRectWidth; uint32_t height = views[0].recommendedImageRectHeight; diff --git a/client/scenes/lobby.h b/client/scenes/lobby.h index 01bc46d2..3fcf387a 100644 --- a/client/scenes/lobby.h +++ b/client/scenes/lobby.h @@ -81,6 +81,7 @@ class lobby : public scene_impl vk::Format swapchain_format; xr::system::passthrough_type passthrough_supported; xr::passthrough passthrough; + XrViewConfigurationView stream_view; void update_server_list(); diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index 296adfb1..c0ee3a1f 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -363,11 +363,13 @@ void scenes::lobby::gui_settings() { const auto available_scales = {0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0}; const auto current = config.resolution_scale; - if (ImGui::BeginCombo("Resolution scale", fmt::format("{}", current).c_str())) + const auto width = stream_view.recommendedImageRectWidth; + const auto height = stream_view.recommendedImageRectHeight; + if (ImGui::BeginCombo("Resolution scale", fmt::format("{} - {}x{} per eye", current, (int)(width * current), (int)(height * current)).c_str())) { for (float scale: available_scales) { - if (ImGui::Selectable(fmt::format("{}", scale).c_str(), scale == current) and scale != current) + if (ImGui::Selectable(fmt::format("{} - {}x{} per eye", scale, (int)(width * scale), (int)(height * scale)).c_str(), scale == current) and scale != current) { config.resolution_scale = scale; config.save();