From 1187df922a95b6e1f553a571d529e46176eac9bb Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 25 Nov 2018 17:24:54 -0500 Subject: [PATCH] restore old functionality till the change is done in other platforms --- gfx/video_driver.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index c3157f8c6c..e544ab2762 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -985,16 +985,25 @@ static bool video_driver_init_internal(bool *video_is_threaded) } else { - if (settings->bools.video_force_aspect) + /* To-Do: remove when the new window resizing core is hooked */ + if (settings->uints.window_position_width || settings->uints.window_position_height) { - /* Do rounding here to simplify integer scale correctness. */ - unsigned base_width = - roundf(geom->base_height * video_driver_get_aspect_ratio()); - width = roundf(base_width * settings->floats.video_scale); + width = settings->uints.window_position_width; + height = settings->uints.window_position_height; } else - width = roundf(geom->base_width * settings->floats.video_scale); - height = roundf(geom->base_height * settings->floats.video_scale); + { + if (settings->bools.video_force_aspect) + { + /* Do rounding here to simplify integer scale correctness. */ + unsigned base_width = + roundf(geom->base_height * video_driver_get_aspect_ratio()); + width = roundf(base_width * settings->floats.video_scale); + } + else + width = roundf(geom->base_width * settings->floats.video_scale); + height = roundf(geom->base_height * settings->floats.video_scale); +} } if (width && height)