mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Change default aspect handling.
This commit is contained in:
parent
a6e74775b1
commit
fef5edfac8
@ -156,8 +156,6 @@ static const bool hires_record = false;
|
|||||||
// Record post-filtered (CPU filter) video rather than raw SNES output.
|
// Record post-filtered (CPU filter) video rather than raw SNES output.
|
||||||
static const bool post_filter_record = false;
|
static const bool post_filter_record = false;
|
||||||
|
|
||||||
#define SNES_ASPECT_RATIO (4.0/3)
|
|
||||||
|
|
||||||
////////////////
|
////////////////
|
||||||
// Audio
|
// Audio
|
||||||
////////////////
|
////////////////
|
||||||
|
8
driver.c
8
driver.c
@ -431,7 +431,7 @@ void init_video_input(void)
|
|||||||
}
|
}
|
||||||
else
|
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);
|
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);
|
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);
|
SSNES_LOG("Video @ %ux%u\n", width, height);
|
||||||
|
|
||||||
video_info_t video = {
|
video_info_t video = {
|
||||||
|
@ -129,7 +129,7 @@ static void set_defaults(void)
|
|||||||
g_settings.video.smooth = video_smooth;
|
g_settings.video.smooth = video_smooth;
|
||||||
g_settings.video.force_aspect = force_aspect;
|
g_settings.video.force_aspect = force_aspect;
|
||||||
g_settings.video.crop_overscan = crop_overscan;
|
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;
|
g_settings.video.shader_type = SSNES_SHADER_AUTO;
|
||||||
|
|
||||||
#ifdef HAVE_FREETYPE
|
#ifdef HAVE_FREETYPE
|
||||||
|
2
ssnes.c
2
ssnes.c
@ -966,7 +966,7 @@ static void init_recording(void)
|
|||||||
params.out_height *= 2;
|
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;
|
params.aspect_ratio = g_settings.video.aspect_ratio;
|
||||||
else
|
else
|
||||||
params.aspect_ratio = (float)params.out_width / params.out_height;
|
params.aspect_ratio = (float)params.out_width / params.out_height;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user