diff --git a/config.def.h b/config.def.h index cc4840f213..c19f2d6366 100644 --- a/config.def.h +++ b/config.def.h @@ -156,8 +156,6 @@ static const bool hires_record = false; // Record post-filtered (CPU filter) video rather than raw SNES output. static const bool post_filter_record = false; -#define SNES_ASPECT_RATIO (4.0/3) - //////////////// // Audio //////////////// diff --git a/driver.c b/driver.c index 5a9f286802..fe56117541 100644 --- a/driver.c +++ b/driver.c @@ -431,7 +431,7 @@ void init_video_input(void) } else { - if (g_settings.video.force_aspect) + if (g_settings.video.force_aspect && (g_settings.video.aspect_ratio > 0.0f)) { width = roundf(g_extern.system.geom.base_height * g_settings.video.xscale * g_settings.video.aspect_ratio); height = roundf(g_extern.system.geom.base_height * g_settings.video.yscale); @@ -443,6 +443,12 @@ void init_video_input(void) } } + if (g_settings.video.aspect_ratio < 0.0f) + { + g_settings.video.aspect_ratio = (float)g_extern.system.geom.base_width / g_extern.system.geom.base_height; + 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 = { diff --git a/settings.c b/settings.c index fc11472215..f21928a9f2 100644 --- a/settings.c +++ b/settings.c @@ -129,7 +129,7 @@ static void set_defaults(void) g_settings.video.smooth = video_smooth; g_settings.video.force_aspect = force_aspect; g_settings.video.crop_overscan = crop_overscan; - g_settings.video.aspect_ratio = SNES_ASPECT_RATIO; + g_settings.video.aspect_ratio = -1.0f; // Automatic g_settings.video.shader_type = SSNES_SHADER_AUTO; #ifdef HAVE_FREETYPE diff --git a/ssnes.c b/ssnes.c index 674e3705e2..03d0c88133 100644 --- a/ssnes.c +++ b/ssnes.c @@ -966,7 +966,7 @@ static void init_recording(void) params.out_height *= 2; } - if (g_settings.video.force_aspect) + if (g_settings.video.force_aspect && (g_settings.video.aspect_ratio > 0.0f)) params.aspect_ratio = g_settings.video.aspect_ratio; else params.aspect_ratio = (float)params.out_width / params.out_height;