Merge pull request #395 from retrotalker/region

Console region option
This commit is contained in:
bearoso 2018-08-15 14:52:11 -05:00 committed by GitHub
commit 26066945d2
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 },
};
@ -412,6 +413,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();
}