Calculate the correct offset for the cl_drawfps 1 framecounter.

We need to take in account that scaling the characters makes them
bigger, thus they need need to be places depending on the scale and not
at a precaclulated position. This should fix issue #247.
This commit is contained in:
Yamagi Burmeister 2017-10-11 19:15:11 +02:00
parent 8bfcfa7e70
commit 4bfd1cb9d4

View file

@ -1445,7 +1445,7 @@ SCR_Framecounter(void) {
char str[10];
snprintf(str, sizeof(str), "%3.2ffps", (1000.0 * 1000.0) / (avg / num));
DrawStringScaled(scale*(viddef.width - 80), 0, str, scale);
DrawStringScaled(viddef.width - scale*(strlen(str)*8 + 2), 0, str, scale);
} else if (cl_drawfps->value >= 2) {
// Calculate average of frames.
int avg = 0;