Don't change ImGui fonts during render job.

This commit is contained in:
Bartosz Taudul 2021-11-18 22:48:14 +01:00
parent 2243b6e293
commit cfec8257cb
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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 ) 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 ) int main( int argc, char** argv )