This commit is contained in:
twinaphex 2020-01-02 18:25:37 +01:00
parent a6245185b9
commit 6b6233944b
1 changed files with 8 additions and 7 deletions

View File

@ -20236,8 +20236,9 @@ error:
static void video_driver_set_viewport_config(void) static void video_driver_set_viewport_config(void)
{ {
settings_t *settings = configuration_settings; settings_t *settings = configuration_settings;
float video_aspect_ratio = settings->floats.video_aspect_ratio;
if (settings->floats.video_aspect_ratio < 0.0f) if (video_aspect_ratio < 0.0f)
{ {
struct retro_game_geometry *geom = &video_driver_av_info.geometry; struct retro_game_geometry *geom = &video_driver_av_info.geometry;
@ -20259,8 +20260,7 @@ static void video_driver_set_viewport_config(void)
} }
} }
else else
aspectratio_lut[ASPECT_RATIO_CONFIG].value = aspectratio_lut[ASPECT_RATIO_CONFIG].value = video_aspect_ratio;
settings->floats.video_aspect_ratio;
} }
static void video_driver_set_viewport_square_pixel(void) static void video_driver_set_viewport_square_pixel(void)
@ -20363,16 +20363,17 @@ static bool video_driver_init_internal(bool *video_is_threaded)
} }
else else
{ {
float video_scale = settings->floats.video_scale;
if (settings->bools.video_force_aspect) if (settings->bools.video_force_aspect)
{ {
/* Do rounding here to simplify integer scale correctness. */ /* Do rounding here to simplify integer scale correctness. */
unsigned base_width = unsigned base_width =
roundf(geom->base_height * video_driver_aspect_ratio); roundf(geom->base_height * video_driver_aspect_ratio);
width = roundf(base_width * settings->floats.video_scale); width = roundf(base_width * video_scale);
} }
else else
width = roundf(geom->base_width * settings->floats.video_scale); width = roundf(geom->base_width * video_scale);
height = roundf(geom->base_height * settings->floats.video_scale); height = roundf(geom->base_height * video_scale);
} }
} }