From 97506a811eb573220ea623c441f430bf498e32a4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 28 Jul 2022 20:08:54 +1000 Subject: [PATCH] ImGuiManager: Fix default OSD scale --- src/core/settings.h | 2 +- src/frontend-common/imgui_manager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/settings.h b/src/core/settings.h index d6b11ec84..e4abb1986 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -129,7 +129,7 @@ struct Settings bool display_all_frames = false; bool display_internal_resolution_screenshots = false; bool video_sync_enabled = DEFAULT_VSYNC_VALUE; - float display_osd_scale = 1.0f; + float display_osd_scale = 100.0f; float display_max_fps = DEFAULT_DISPLAY_MAX_FPS; float gpu_pgxp_tolerance = -1.0f; float gpu_pgxp_depth_clear_threshold = DEFAULT_GPU_PGXP_DEPTH_THRESHOLD; diff --git a/src/frontend-common/imgui_manager.cpp b/src/frontend-common/imgui_manager.cpp index c457fd926..f1126bf79 100644 --- a/src/frontend-common/imgui_manager.cpp +++ b/src/frontend-common/imgui_manager.cpp @@ -81,7 +81,7 @@ bool ImGuiManager::Initialize() } s_global_scale = - std::max(1.0f, g_host_display->GetWindowScale() * static_cast(g_settings.display_osd_scale / 100.0f)); + std::max(g_host_display->GetWindowScale() * static_cast(g_settings.display_osd_scale / 100.0f), 1.0f); ImGui::CreateContext(); @@ -163,7 +163,7 @@ void ImGuiManager::WindowResized() void ImGuiManager::UpdateScale() { const float window_scale = g_host_display ? g_host_display->GetWindowScale() : 1.0f; - const float scale = std::max(window_scale * static_cast(/*EmuConfig.GS.OsdScale*/ 100.0 / 100.0), 1.0f); + const float scale = std::max(window_scale * static_cast(g_settings.display_osd_scale / 100.0f), 1.0f); if (scale == s_global_scale && (!HasFullscreenFonts() || !ImGuiFullscreen::UpdateLayoutScale())) return;