From facb2703f61e8755888ad2cf660dd733b2b6442a Mon Sep 17 00:00:00 2001 From: dankcushions Date: Sun, 13 Nov 2016 22:38:48 +0000 Subject: [PATCH] Do not allow custom resolutions to be below the game resolution when integer scale is on. --- menu/menu_setting.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 2b5f1d9366..5b72ce2288 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -190,7 +190,10 @@ static int setting_uint_action_left_custom_viewport_width(void *data, bool wrapa if (custom->width <= 1) custom->width = 1; else if (settings->video.scale_integer) - custom->width -= geom->base_width; + { + if (custom->width > geom->base_width) + custom->width -= geom->base_width; + } else custom->width -= 1; @@ -242,7 +245,10 @@ static int setting_uint_action_left_custom_viewport_height(void *data, bool wrap if (custom->height <= 1) custom->height = 1; else if (settings->video.scale_integer) - custom->height -= geom->base_height; + { + if (custom->height > geom->base_height) + custom->height -= geom->base_height; + } else custom->height -= 1;