- draw the FPS counter with the new console font.

With the current scale settings the original one is simply too small.
This commit is contained in:
Christoph Oelckers 2019-03-18 14:27:42 +01:00
parent 4120e72dbd
commit b48f4032d8

View file

@ -156,9 +156,9 @@ void DFrameBuffer::DrawRateStuff ()
int textScale = active_con_scale(); int textScale = active_con_scale();
chars = mysnprintf (fpsbuff, countof(fpsbuff), "%2llu ms (%3llu fps)", (unsigned long long)howlong, (unsigned long long)LastCount); chars = mysnprintf (fpsbuff, countof(fpsbuff), "%2llu ms (%3llu fps)", (unsigned long long)howlong, (unsigned long long)LastCount);
rate_x = Width / textScale - ConFont->StringWidth(&fpsbuff[0]); rate_x = Width / textScale - NewConsoleFont->StringWidth(&fpsbuff[0]);
Clear (rate_x * textScale, 0, Width, ConFont->GetHeight() * textScale, GPalette.BlackIndex, 0); Clear (rate_x * textScale, 0, Width, NewConsoleFont->GetHeight() * textScale, GPalette.BlackIndex, 0);
DrawText (ConFont, CR_WHITE, rate_x, 0, (char *)&fpsbuff[0], DrawText (NewConsoleFont, CR_WHITE, rate_x, 0, (char *)&fpsbuff[0],
DTA_VirtualWidth, screen->GetWidth() / textScale, DTA_VirtualWidth, screen->GetWidth() / textScale,
DTA_VirtualHeight, screen->GetHeight() / textScale, DTA_VirtualHeight, screen->GetHeight() / textScale,
DTA_KeepRatio, true, TAG_DONE); DTA_KeepRatio, true, TAG_DONE);