ImGuiManager: Fix default OSD scale

This commit is contained in:
Connor McLaughlin 2022-07-28 20:08:54 +10:00
parent a461ba8be6
commit 97506a811e
2 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -81,7 +81,7 @@ bool ImGuiManager::Initialize()
}
s_global_scale =
std::max(1.0f, g_host_display->GetWindowScale() * static_cast<float>(g_settings.display_osd_scale / 100.0f));
std::max(g_host_display->GetWindowScale() * static_cast<float>(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<float>(/*EmuConfig.GS.OsdScale*/ 100.0 / 100.0), 1.0f);
const float scale = std::max(window_scale * static_cast<float>(g_settings.display_osd_scale / 100.0f), 1.0f);
if (scale == s_global_scale && (!HasFullscreenFonts() || !ImGuiFullscreen::UpdateLayoutScale()))
return;