From 1c179adb818326c3e44c1941d3ecc501e1e6fdb1 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 12 Dec 2024 10:39:34 +0100 Subject: [PATCH] do not redraw view border three times (#2087) * do not redraw view border three times We do not have three video buffers anymore. * turn borderdrawcount into a boolean --- src/d_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 36470e9d..48f5e8df 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -257,7 +257,7 @@ void D_Display (void) static boolean viewactivestate = false; static boolean menuactivestate = false; static gamestate_t oldgamestate = GS_NONE; - static int borderdrawcount; + static boolean borderdrawcount; int wipestart; boolean done, wipe; @@ -308,7 +308,7 @@ void D_Display (void) { R_ExecuteSetViewSize(); oldgamestate = GS_NONE; // force background redraw - borderdrawcount = 3; + borderdrawcount = true; } if (gamestate == GS_LEVEL && gametic) @@ -356,11 +356,11 @@ void D_Display (void) if (gamestate == GS_LEVEL && automap_off && scaledviewwidth != video.unscaledw) { if (menuactive || menuactivestate || !viewactivestate) - borderdrawcount = 3; + borderdrawcount = true; if (borderdrawcount) { R_DrawViewBorder(); // erase old menu stuff - borderdrawcount--; + borderdrawcount = false; } }