mirror of https://github.com/snes9xgit/snes9x.git
Create a separate aspect ratio option for '4:3 Preserved'
This commit is contained in:
parent
d7dc9acf2f
commit
eb7ddae407
|
@ -49,6 +49,8 @@ static int g_screen_gun_height = SNES_HEIGHT;
|
||||||
#define RETRO_GAME_TYPE_MULTI_CART 0x105 | 0x1000
|
#define RETRO_GAME_TYPE_MULTI_CART 0x105 | 0x1000
|
||||||
|
|
||||||
|
|
||||||
|
#define SNES_4_3 4.0f / 3.0f
|
||||||
|
|
||||||
uint16 *screen_buffer = NULL;
|
uint16 *screen_buffer = NULL;
|
||||||
|
|
||||||
char g_rom_dir[1024];
|
char g_rom_dir[1024];
|
||||||
|
@ -144,6 +146,7 @@ enum overscan_mode {
|
||||||
};
|
};
|
||||||
enum aspect_mode {
|
enum aspect_mode {
|
||||||
ASPECT_RATIO_4_3,
|
ASPECT_RATIO_4_3,
|
||||||
|
ASPECT_RATIO_4_3_SCALED,
|
||||||
ASPECT_RATIO_1_1,
|
ASPECT_RATIO_1_1,
|
||||||
ASPECT_RATIO_NTSC,
|
ASPECT_RATIO_NTSC,
|
||||||
ASPECT_RATIO_PAL,
|
ASPECT_RATIO_PAL,
|
||||||
|
@ -460,6 +463,8 @@ static void update_variables(void)
|
||||||
newval = ASPECT_RATIO_PAL;
|
newval = ASPECT_RATIO_PAL;
|
||||||
else if (strcmp(var.value, "4:3") == 0)
|
else if (strcmp(var.value, "4:3") == 0)
|
||||||
newval = ASPECT_RATIO_4_3;
|
newval = ASPECT_RATIO_4_3;
|
||||||
|
else if (strcmp(var.value, "4:3 scaled") == 0)
|
||||||
|
newval = ASPECT_RATIO_4_3_SCALED;
|
||||||
else if (strcmp(var.value, "uncorrected") == 0)
|
else if (strcmp(var.value, "uncorrected") == 0)
|
||||||
newval = ASPECT_RATIO_1_1;
|
newval = ASPECT_RATIO_1_1;
|
||||||
|
|
||||||
|
@ -785,6 +790,10 @@ void retro_get_system_info(struct retro_system_info *info)
|
||||||
float get_aspect_ratio(unsigned width, unsigned height)
|
float get_aspect_ratio(unsigned width, unsigned height)
|
||||||
{
|
{
|
||||||
if (aspect_ratio_mode == ASPECT_RATIO_4_3)
|
if (aspect_ratio_mode == ASPECT_RATIO_4_3)
|
||||||
|
{
|
||||||
|
return SNES_4_3;
|
||||||
|
}
|
||||||
|
else if (aspect_ratio_mode == ASPECT_RATIO_4_3_SCALED)
|
||||||
{
|
{
|
||||||
return (4.0f * (MAX_SNES_HEIGHT - height)) / (3.0f * (MAX_SNES_WIDTH - width));
|
return (4.0f * (MAX_SNES_HEIGHT - height)) / (3.0f * (MAX_SNES_WIDTH - width));
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,11 +72,12 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
"Choose the preferred content aspect ratio. This will only apply when RetroArch's aspect ratio is set to 'Core provided' in the Video settings.",
|
"Choose the preferred content aspect ratio. This will only apply when RetroArch's aspect ratio is set to 'Core provided' in the Video settings.",
|
||||||
{
|
{
|
||||||
{ "4:3", NULL },
|
{ "4:3", NULL },
|
||||||
|
{ "4:3 scaled", "4:3 (Preserved)" },
|
||||||
{ "uncorrected", "Uncorrected" },
|
{ "uncorrected", "Uncorrected" },
|
||||||
{ "auto", "Auto" },
|
{ "auto", "Auto" },
|
||||||
{ "ntsc", "NTSC" },
|
{ "ntsc", "NTSC" },
|
||||||
{ "pal", "PAL" },
|
{ "pal", "PAL" },
|
||||||
{ NULL, NULL},
|
{ NULL, NULL },
|
||||||
},
|
},
|
||||||
"4:3"
|
"4:3"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue