Merge pull request #7650 from fr500/upstream

restore old functionality till the change is done in other platforms
This commit is contained in:
Twinaphex 2018-11-25 23:32:15 +01:00 committed by GitHub
commit 9f3efd03ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)