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
This commit is contained in:
Fabian Greffrath 2024-12-12 10:39:34 +01:00 committed by GitHub
parent 29e1e9e1b5
commit 1c179adb81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
}