mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 22:05:38 +00:00
ImGuiManager: Fix default OSD scale
This commit is contained in:
parent
a461ba8be6
commit
97506a811e
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue