From bf066763b70c2c0d0325b3d5667824b0da76ebd9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 4 Feb 2016 01:20:35 +0100 Subject: [PATCH] - fixed: The FPS display should use the actual font info to calculate its size, not just assume that each character is 8*8 pixels. --- src/v_video.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v_video.cpp b/src/v_video.cpp index 042469193..37cc3163d 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -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;