run DRS only in GS_LEVEL state, make width even

This commit is contained in:
Roman Fomin 2023-12-29 14:12:19 +07:00
parent e0fa94de5d
commit 82e00563e6
2 changed files with 3 additions and 3 deletions

View File

@ -251,7 +251,7 @@ void D_Display (void)
// save the current screen if about to wipe // save the current screen if about to wipe
if ((wipe = gamestate != wipegamestate) && NOTSTRICTMODE(screen_melt)) if ((wipe = gamestate != wipegamestate) && NOTSTRICTMODE(screen_melt))
wipe_StartScreen(0, 0, video.unscaledw, SCREENHEIGHT); wipe_StartScreen(0, 0, video.unscaledw, SCREENHEIGHT);
else else if (gamestate == GS_LEVEL)
I_DynamicResolution(); I_DynamicResolution();
if (setsizeneeded) // change the view size if needed if (setsizeneeded) // change the view size if needed

View File

@ -1028,7 +1028,7 @@ static void ResetResolution(int height)
video.unscaledw = (int)(unscaled_actualheight * aspect_ratio); video.unscaledw = (int)(unscaled_actualheight * aspect_ratio);
video.unscaledw = (video.unscaledw + 3) & ~3; video.unscaledw = (video.unscaledw + 1) & ~1;
// Unscaled widescreen 16:9 resolution truncates to 428x240, which is not // Unscaled widescreen 16:9 resolution truncates to 428x240, which is not
// quite 16:9. To avoid visual instability, we calculate the scaled width // quite 16:9. To avoid visual instability, we calculate the scaled width
@ -1038,7 +1038,7 @@ static void ResetResolution(int height)
double vertscale = (double)actualheight / (double)unscaled_actualheight; double vertscale = (double)actualheight / (double)unscaled_actualheight;
video.width = (int)(video.unscaledw * vertscale); video.width = (int)(video.unscaledw * vertscale);
video.width = (video.width + 3) & ~3; video.width = (video.width + 1) & ~1;
video.deltaw = (video.unscaledw - NONWIDEWIDTH) / 2; video.deltaw = (video.unscaledw - NONWIDEWIDTH) / 2;