Skip to content
Permalink
Browse files

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

- Prevent GB type hardware change during runtime.
  • Loading branch information
retro-wertz
retro-wertz committed Jul 18, 2019
1 parent 8462ca7 commit 02a7a48bf3544ceaaa433970a0009dfa03878093
Showing with 3 additions and 2 deletions.
  1. +2 −1 src/libretro/libretro.cpp
  2. +1 −1 src/libretro/libretro_core_options.h
@@ -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)
@@ -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" },

0 comments on commit 02a7a48

Please sign in to comment.
You can’t perform that action at this time.