diff --git a/polymer/eduke32/source/screens.c b/polymer/eduke32/source/screens.c index c6ea999d2..c2954e4f1 100644 --- a/polymer/eduke32/source/screens.c +++ b/polymer/eduke32/source/screens.c @@ -765,6 +765,8 @@ static void G_ShowCacheLocks(void) # define FPS_YOFFSET 0 #endif +#define FPS_COLOR(x) ((x) ? COLOR_RED : COLOR_WHITE) + static void G_PrintFPS(void) { // adapted from ZDoom because I like it better than what we had @@ -775,7 +777,7 @@ static void G_PrintFPS(void) int32_t ms = getticks(); int32_t howlong = ms - LastMS; - if (g_player[0].ps->player_par < 2) + if (g_player[0].ps->player_par < 3) { MinFrames = INT32_MAX; MaxFrames = 0; @@ -792,7 +794,7 @@ static void G_PrintFPS(void) printext256(windowxy2.x-(chars<<(3-x))+1, windowxy1.y+2+FPS_YOFFSET, 0, -1, tempbuf, x); printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+1+FPS_YOFFSET, - (LastCount < LOW_FPS) ? COLOR_RED : COLOR_WHITE, -1, tempbuf, x); + FPS_COLOR(LastCount < LOW_FPS), -1, tempbuf, x); if (ud.tickrate > 1) { @@ -800,13 +802,13 @@ static void G_PrintFPS(void) printext256(windowxy2.x-(chars<<(3-x))+1, windowxy1.y+10+2+FPS_YOFFSET, 0, -1, tempbuf, x); printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+10+FPS_YOFFSET, - (MaxFrames < LOW_FPS) ? COLOR_RED : COLOR_WHITE, -1, tempbuf, x); + FPS_COLOR(MaxFrames < LOW_FPS), -1, tempbuf, x); chars = Bsprintf(tempbuf, "min fps: %3u", MinFrames); printext256(windowxy2.x-(chars<<(3-x))+1, windowxy1.y+20+2+FPS_YOFFSET, 0, -1, tempbuf, x); printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+20+FPS_YOFFSET, - (MinFrames < LOW_FPS) ? COLOR_RED : COLOR_WHITE, -1, tempbuf, x); + FPS_COLOR(MinFrames < LOW_FPS), -1, tempbuf, x); } // lag meter @@ -816,7 +818,7 @@ static void G_PrintFPS(void) (g_netClientPeer->lastRoundTripTimeVariance + g_netClientPeer->roundTripTimeVariance)/2); printext256(windowxy2.x-(chars<<(3-x))+1, windowxy1.y+30+2+FPS_YOFFSET, 0, -1, tempbuf, x); - printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+30+1+FPS_YOFFSET, g_netClientPeer->lastRoundTripTime > 200 ? COLOR_RED : COLOR_WHITE, -1, tempbuf, x); + printext256(windowxy2.x-(chars<<(3-x)), windowxy1.y+30+1+FPS_YOFFSET, FPS_COLOR(g_netClientPeer->lastRoundTripTime > 200), -1, tempbuf, x); } } @@ -837,6 +839,8 @@ static void G_PrintFPS(void) LastMS = ms; } +#undef FPS_COLOR + void G_DisplayRest(int32_t smoothratio) { int32_t i, j;