Console region option

auto, ntsc, pal
This commit is contained in:
retrotalker 2018-08-15 12:08:57 -05:00 committed by GitHub
parent e3216ec88e
commit 3425a234dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -191,6 +191,7 @@ void retro_set_environment(retro_environment_t cb)
{ "snes9x_sndchan_8", "Enable sound channel 8; enabled|disabled" },
{ "snes9x_overscan", "Crop overscan; enabled|disabled|auto" },
{ "snes9x_aspect", "Preferred aspect ratio; 4:3|8:7|auto|ntsc|pal" },
{ "snes9x_region", "Console region (Reload core); auto|ntsc|pal" },
{ NULL, NULL },
};
@ -406,6 +407,27 @@ static void update_variables(void)
}
}
var.key = "snes9x_region";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "auto"))
{
Settings.ForceNTSC = false;
Settings.ForcePAL = false;
}
else if (!strcmp(var.value, "ntsc"))
{
Settings.ForceNTSC = true;
Settings.ForcePAL = false;
}
else if (!strcmp(var.value, "pal"))
{
Settings.ForceNTSC = false;
Settings.ForcePAL = true;
}
}
if (geometry_update)
update_geometry();
}