Do not perform DPI setup when DPI might be not yet known.

Reloading fonts is a fairly lenghty operation (~30-50 ms), so avoid doing
it twice in a row.
This commit is contained in:
Bartosz Taudul 2024-09-28 13:55:07 +02:00
parent 44ae59f363
commit 9f682c6015
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -394,13 +394,12 @@ int main( int argc, char** argv )
{ {
dpiScale = cnv; dpiScale = cnv;
dpiScaleOverriddenFromEnv = true; dpiScaleOverriddenFromEnv = true;
SetupDPIScale();
} }
} }
s_achievements->Achieve( "achievementsIntro" ); s_achievements->Achieve( "achievementsIntro" );
SetupDPIScale();
tracy::UpdateTextureRGBAMips( zigzagTex, (void**)zigzagPx, zigzagX, zigzagY, 6 ); tracy::UpdateTextureRGBAMips( zigzagTex, (void**)zigzagPx, zigzagX, zigzagY, 6 );
for( auto& v : zigzagPx ) free( v ); for( auto& v : zigzagPx ) free( v );