Skip to content

Commit 8b31ab6

Browse files
committed
Avoid resolution dependent code
1 parent a74bd56 commit 8b31ab6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/riscv/d_main.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,14 @@ void D_Display (void)
232232
break;
233233
if (automapactive)
234234
AM_Drawer ();
235-
if (wipe || (viewheight != 200 && fullscreen) )
235+
if (wipe || (viewheight != SCREENHEIGHT && fullscreen) )
236236
redrawsbar = true;
237237
if (inhelpscreensstate && !inhelpscreens)
238238
redrawsbar = true; // just put away the help screen
239-
ST_Drawer (viewheight == 200, redrawsbar );
240-
fullscreen = viewheight == 200;
239+
if (menuactivestate)
240+
redrawsbar = true; // menu may have overdrawn the bar
241+
ST_Drawer (viewheight == SCREENHEIGHT, redrawsbar );
242+
fullscreen = viewheight == SCREENHEIGHT;
241243
break;
242244

243245
case GS_INTERMISSION:
@@ -275,7 +277,7 @@ void D_Display (void)
275277
}
276278

277279
// see if the border needs to be updated to the screen
278-
if (gamestate == GS_LEVEL && !automapactive && scaledviewwidth != 320)
280+
if (gamestate == GS_LEVEL && !automapactive && scaledviewwidth != SCREENWIDTH)
279281
{
280282
if (menuactive || menuactivestate || !viewactivestate)
281283
borderdrawcount = 3;

0 commit comments

Comments
 (0)