- fixed: The FPS display should use the actual font info to calculate its size, not just assume that each character is 8*8 pixels.

This commit is contained in:
Christoph Oelckers 2016-02-04 01:20:35 +01:00
parent 3f1740b944
commit bf066763b7

View file

@ -858,8 +858,8 @@ void DFrameBuffer::DrawRateStuff ()
int rate_x;
chars = mysnprintf (fpsbuff, countof(fpsbuff), "%2u ms (%3u fps)", howlong, LastCount);
rate_x = Width - chars * 8;
Clear (rate_x, 0, Width, 8, GPalette.BlackIndex, 0);
rate_x = Width - ConFont->StringWidth(&fpsbuff[0]);
Clear (rate_x, 0, Width, ConFont->GetHeight(), GPalette.BlackIndex, 0);
DrawText (ConFont, CR_WHITE, rate_x, 0, (char *)&fpsbuff[0], TAG_DONE);
DWORD thisSec = ms/1000;