GB: Fix selected palette not applied when loading content...

- Prevent GB type hardware change during runtime.
This commit is contained in:
retro-wertz 2019-07-18 17:35:54 +08:00
parent 8462ca76ca
commit 02a7a48bf3
2 changed files with 3 additions and 2 deletions

View File

@ -896,6 +896,7 @@ static void gb_init(void)
gbSoundSetDeclicking(1);
gbReset(); // also resets sound;
set_gbPalette();
// VBA-M always updates time based on current time and not in-game time.
// No need to add RTC data to RETRO_MEMORY_RTC, so its safe to place this here.
@ -1092,7 +1093,7 @@ static void update_variables(bool startup)
var.key = "vbam_gbHardware";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value && startup) {
if (strcmp(var.value, "auto") == 0)
gbEmulatorType = 0;
else if (strcmp(var.value, "gbc") == 0)

View File

@ -110,7 +110,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"vbam_gbHardware",
"(GB) Emulated Hardware",
"Sets the Game Boy hardware type to emulate.",
"Sets the Game Boy hardware type to emulate. Restart core to apply.",
{
{ "gbc", "Game Boy Color" },
{ "auto", "Automatic" },