GB Core: Fix palette loading when loading a foreign config
Vicki Pfau vi@endrift.com
Fri, 28 Jul 2017 14:29:56 -0700
2 files changed,
9 insertions(+),
8 deletions(-)
M
CHANGES
→
CHANGES
@@ -7,6 +7,7 @@ - GB MBC: Pocket Cam memory should be accessible without enabling
- 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: - Qt: Don't rebuild library view if style hasn't changed
M
src/gb/core.c
→
src/gb/core.c
@@ -167,17 +167,17 @@ }
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");