Replace resolution dropdown with a slider; Increase limit to 500%
This commit is contained in:
@@ -607,17 +607,11 @@ void scenes::lobby::gui_settings()
|
||||
const auto current = config.resolution_scale;
|
||||
const auto width = stream_view.recommendedImageRectWidth;
|
||||
const auto height = stream_view.recommendedImageRectHeight;
|
||||
if (ImGui::BeginCombo(_S("Resolution scale"), fmt::format(_F("{}% - {}x{} per eye"), int(current * 100), int(width * current), int(height * current)).c_str()))
|
||||
auto intScale = int(current * 100);
|
||||
if (ImGui::SliderInt(_S("Resolution scale"), &intScale, 50, 500, fmt::format(_F("%d%% - {}x{} per eye"), int(width * current), int(height * current)).c_str()))
|
||||
{
|
||||
for (int scale = 50; scale <= 200; scale += 10)
|
||||
{
|
||||
if (ImGui::Selectable(fmt::format(_F("{}% - {}x{} per eye"), scale, (width * scale) / 100, (height * scale) / 100).c_str(), scale == current, ImGuiSelectableFlags_SelectOnRelease) and scale != current)
|
||||
{
|
||||
config.resolution_scale = scale * 0.01;
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
config.resolution_scale = intScale * 0.01;
|
||||
config.save();
|
||||
}
|
||||
vibrate_on_hover();
|
||||
if (width * config.resolution_scale > stream_view.maxImageRectWidth or height * config.resolution_scale > stream_view.maxImageRectHeight)
|
||||
|
||||
Reference in New Issue
Block a user