From cfec8257cb527fd178d639a616c6b72bd76bff5d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 18 Nov 2021 22:48:14 +0100 Subject: [PATCH] Don't change ImGui fonts during render job. --- profiler/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index f38214cc..2e76dc8e 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -197,7 +197,7 @@ static void SetupDPIScale( float scale, ImFont*& fixedWidth, ImFont*& bigFont, I static void SetupScaleCallback( float scale, ImFont*& fixedWidth, ImFont*& bigFont, ImFont*& smallFont ) { - SetupDPIScale( scale * dpiScale, fixedWidth, bigFont, smallFont ); + RunOnMainThread( [scale, &fixedWidth, &bigFont, &smallFont] { SetupDPIScale( scale * dpiScale, fixedWidth, bigFont, smallFont ); }, true ); } int main( int argc, char** argv )