From a8235ca9c96455a93e83fd1f319a3ab150d99842 Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Sat, 5 Nov 2022 13:56:25 +0100 Subject: [PATCH] GlosSITarget: Fix UI Scaling --- GlosSITarget/TargetWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GlosSITarget/TargetWindow.cpp b/GlosSITarget/TargetWindow.cpp index 9d0d938..5744f9d 100644 --- a/GlosSITarget/TargetWindow.cpp +++ b/GlosSITarget/TargetWindow.cpp @@ -357,6 +357,7 @@ void TargetWindow::createWindow() overlay_ = std::make_shared( window_, [this]() { close(); }, toggle_overlay_state_, Settings::window.windowMode); + spdlog::debug("auto screen scale: {}", dpi/96.f); ImGuiIO& io = ImGui::GetIO(); io.FontGlobalScale = dpi / 96.f; ImGui::SFML::UpdateFontTexture(); @@ -369,7 +370,8 @@ void TargetWindow::createWindow() spdlog::debug("Config file fps limit seems sane..."); setFpsLimit(Settings::window.maxFps); } - if (Settings::window.scale < 0.3f) { // Now that's just getting ridicoulus + if (Settings::window.scale > 0.3f) { // Now that's just getting ridicoulus + spdlog::debug("setting screen scale by config: {}", Settings::window.scale); ImGuiIO& io = ImGui::GetIO(); io.FontGlobalScale = Settings::window.scale; ImGui::SFML::UpdateFontTexture();