From bf8fa069111d4b94c4f1f2fe1c950db83b7d74c0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 27 Sep 2015 19:07:54 +0200 Subject: [PATCH] Attempt to correct integer scaling left/right --- menu/menu_input.c | 1 - menu/menu_setting.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/menu/menu_input.c b/menu/menu_input.c index dc92a6019a..6cf2f18d9a 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -1313,4 +1313,3 @@ unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input) return ret; } - diff --git a/menu/menu_setting.c b/menu/menu_setting.c index ecb38c632d..5875e335c1 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -926,7 +926,7 @@ static int setting_uint_action_left_custom_viewport_width(void *data, bool wrapa video_driver_viewport_info(&vp); if (settings->video.scale_integer) - custom->width -= geom->base_width; + custom->width = (custom->width % geom->base_width - 1) * geom->base_width; else custom->width -= 1; @@ -948,7 +948,7 @@ static int setting_uint_action_right_custom_viewport_width(void *data, bool wrap video_driver_viewport_info(&vp); if (settings->video.scale_integer) - custom->width += geom->base_width; + custom->width = (custom->width % geom->base_width + 1) * geom->base_width; else custom->width += 1; @@ -970,7 +970,7 @@ static int setting_uint_action_left_custom_viewport_height(void *data, bool wrap video_driver_viewport_info(&vp); if (settings->video.scale_integer) - custom->height -= geom->base_height; + custom->height = (custom->height % geom->base_height - 1) * geom->base_height; else custom->height -= 1; @@ -992,7 +992,7 @@ static int setting_uint_action_right_custom_viewport_height(void *data, bool wra video_driver_viewport_info(&vp); if (settings->video.scale_integer) - custom->height += geom->base_height; + custom->height = (custom->height % geom->base_height + 1) * geom->base_height; else custom->height += 1;