From f593e2aa3c9252dff1c1f71916e457c36388ad42 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 3 Jun 2017 16:58:09 +0200 Subject: [PATCH] - Fix stat output to use the console scale --- src/stats.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/stats.cpp b/src/stats.cpp index d0d5d2f02..d4c1d37df 100644 --- a/src/stats.cpp +++ b/src/stats.cpp @@ -89,8 +89,10 @@ void FStat::ToggleStat () void FStat::PrintStat () { + int textScale = active_con_scale(); + int fontheight = ConFont->GetHeight() + 1; - int y = SCREENHEIGHT; + int y = SCREENHEIGHT / textScale; int count = 0; for (FStat *stat = FirstStat; stat != NULL; stat = stat->m_Next) @@ -107,7 +109,10 @@ void FStat::PrintStat () // Count number of linefeeds but ignore terminating ones. if (stattext[i] == '\n') y -= fontheight; } - screen->DrawText(ConFont, CR_GREEN, 5, y, stattext, TAG_DONE); + screen->DrawText(ConFont, CR_GREEN, 5 / textScale, y, stattext, + DTA_VirtualWidth, screen->GetWidth() / textScale, + DTA_VirtualHeight, screen->GetHeight() / textScale, + DTA_KeepRatio, true, TAG_DONE); count++; } }