From f6ed5902c22afb9594312a22a4639cb711db1021 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 15 Apr 2012 21:48:01 +0200 Subject: [PATCH] Fixups for aspect_ratio_auto. --- driver.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/driver.c b/driver.c index 268c44a156..8c6bb9b51e 100644 --- a/driver.c +++ b/driver.c @@ -506,6 +506,16 @@ void init_video_input(void) if (g_extern.filter.active) scale = g_extern.filter.scale; + if (g_settings.video.aspect_ratio < 0.0f) + { + if (geom->aspect_ratio > 0.0f && g_settings.video.aspect_ratio_auto) + g_settings.video.aspect_ratio = geom->aspect_ratio; + else + g_settings.video.aspect_ratio = (float)geom->base_width / geom->base_height; // 1:1 PAR. + + SSNES_LOG("Adjusting aspect ratio to %.2f\n", g_settings.video.aspect_ratio); + } + unsigned width; unsigned height; if (g_settings.video.fullscreen) @@ -515,7 +525,7 @@ void init_video_input(void) } else { - if (g_settings.video.force_aspect && (g_settings.video.aspect_ratio > 0.0f)) + if (g_settings.video.force_aspect) { width = roundf(geom->base_height * g_settings.video.xscale * g_settings.video.aspect_ratio); height = roundf(geom->base_height * g_settings.video.yscale); @@ -527,16 +537,6 @@ void init_video_input(void) } } - if (g_settings.video.aspect_ratio < 0.0f) - { - if (geom->aspect_ratio > 0.0f && g_settings.video.aspect_ratio_auto) - g_settings.video.aspect_ratio = geom->aspect_ratio; - else - g_settings.video.aspect_ratio = (float)geom->base_width / geom->base_height; // 1:1 PAR. - - SSNES_LOG("Adjusting aspect ratio to %.2f\n", g_settings.video.aspect_ratio); - } - SSNES_LOG("Video @ %ux%u\n", width, height); video_info_t video = {0};