diff --git a/CHANGES b/CHANGES index 679f9edad..707aa9367 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,7 @@ Bugfixes: - GB Memory: Initialize peripheral pointers - GB MBC: Fix SRAM sizes 4 and 5 - GB Video: Fix 16-bit screenshots (fixes mgba.io/i/826) + - GB Core: Fix palette loading when loading a foreign config Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722) diff --git a/src/gb/core.c b/src/gb/core.c index db12ec457..2e50324df 100644 --- a/src/gb/core.c +++ b/src/gb/core.c @@ -167,17 +167,17 @@ static void _GBCoreLoadConfig(struct mCore* core, const struct mCoreConfig* conf gb->video.frameskip = core->opts.frameskip; int color; - if (mCoreConfigGetIntValue(&core->config, "gb.pal[0]", &color)) { - GBVideoSetPalette(&gb->video, 0, color); + if (mCoreConfigGetIntValue(config, "gb.pal[0]", &color)) { + GBVideoSetPalette(&gb->video, 0, color); } - if (mCoreConfigGetIntValue(&core->config, "gb.pal[1]", &color)) { - GBVideoSetPalette(&gb->video, 1, color); + if (mCoreConfigGetIntValue(config, "gb.pal[1]", &color)) { + GBVideoSetPalette(&gb->video, 1, color); } - if (mCoreConfigGetIntValue(&core->config, "gb.pal[2]", &color)) { - GBVideoSetPalette(&gb->video, 2, color); + if (mCoreConfigGetIntValue(config, "gb.pal[2]", &color)) { + GBVideoSetPalette(&gb->video, 2, color); } - if (mCoreConfigGetIntValue(&core->config, "gb.pal[3]", &color)) { - GBVideoSetPalette(&gb->video, 3, color); + if (mCoreConfigGetIntValue(config, "gb.pal[3]", &color)) { + GBVideoSetPalette(&gb->video, 3, color); } mCoreConfigCopyValue(&core->config, config, "gb.bios");