Libretro: Add support for GCB and SGB palette presets

This commit is contained in:
Vicki Pfau 2021-12-12 21:45:42 -08:00
parent f7d594a8b5
commit 9878e2e780
2 changed files with 22 additions and 0 deletions

View File

@ -288,6 +288,12 @@ static void _reloadSettings(void) {
mCoreConfigSetDefaultIntValue(&core->config, "sgb.borders", strcmp(var.value, "ON") == 0);
}
var.key = "mgba_gb_colors_preset";
var.value = 0;
if (environCallback(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {
mCoreConfigSetDefaultIntValue(&core->config, "gb.colors", strtol(var.value, NULL, 10));
}
_updateGbPal();
#endif

View File

@ -138,6 +138,22 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"Grayscale"
},
{
"mgba_gb_colors_preset",
"Hardware Preset Game Boy Palettes (Restart)",
NULL,
"Use the palettes for Game Boy games that have presets on the Game Boy Color or Super Game Boy.",
NULL,
"video",
{
{ "0", "" },
{ "1", "Game Boy Color presets only" },
{ "2", "Super Game Boy presets only" },
{ "3", "Any available presets" },
{ NULL, NULL },
},
"ON"
},
{
"mgba_sgb_borders",
"Use Super Game Boy Borders (Restart)",