From 1096c14a3a2d7c7f97b949724fbc999985444ab7 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 227d8b84df..22cb485936 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -546,7 +546,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 a8270496f0..6ab81ffa55 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -2188,7 +2188,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"