From b4407eb241949a7c73ad99a4c7e9278dfe5c63e8 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 7 Apr 2019 06:01:47 -0400 Subject: [PATCH] - remove 320x240 from the list of resolution presets - enforce a minimum CleanXfac scaling in the menu to prevent accidental divide by 0's --- src/v_video.cpp | 2 +- wadsrc/static/menudef.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/v_video.cpp b/src/v_video.cpp index 82f4498721..a8c00409d7 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -550,7 +550,7 @@ void V_UpdateModeSize (int width, int height) // This reference size is being used so that on 800x450 (small 16:9) a scale of 2 gets used. - CleanXfac = std::min(screen->GetWidth() / 400, screen->GetHeight() / 240); + CleanXfac = std::max(std::min(screen->GetWidth() / 400, screen->GetHeight() / 240), 1); if (CleanXfac >= 4) CleanXfac--; // Otherwise we do not have enough space for the episode/skill menus in some languages. CleanYfac = CleanXfac; CleanWidth = screen->GetWidth() / CleanXfac; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 42dbd7fe51..3d99a94442 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -2189,7 +2189,6 @@ OptionMenu CustomResolutionMenu protected StaticText "$VIDMNU_RESPRESETHEAD" StaticText "" StaticText "$VIDMNU_ASPECT43" - Command "320x240", "menu_resolution_set_custom 320 240" Command "640x480", "menu_resolution_set_custom 640 480" Command "1024x768", "menu_resolution_set_custom 1024 768" Command "1280x960", "menu_resolution_set_custom 1280 960"