From 578759384d495e3a64a5ea6d00e4388897656826 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 16 Mar 2024 01:16:25 +0100 Subject: [PATCH] Make sure first DPI setup is run. --- profiler/src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index fd776737..69118284 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -100,6 +100,7 @@ static bool dpiScaleOverriddenFromEnv = false; static float userScale = 1.f; static float prevScale = 1.f; static int dpiChanged = 0; +static bool dpiFirstSetup = true; static Filters* filt; static RunQueue mainThreadTasks; static uint32_t updateVersion = 0; @@ -150,7 +151,8 @@ static void SetupDPIScale() { auto scale = dpiScale * userScale; - if( prevScale == scale ) return; + if( !dpiFirstSetup && prevScale == scale ) return; + dpiFirstSetup = false; dpiChanged = 2; LoadFonts( scale );