all repos — mgba @ 5a0a60ba6257742b28e54a47c8a3f0b5909c4fbd

mGBA Game Boy Advance Emulator

GB Core: Fix palette loading when loading a foreign config
Vicki Pfau vi@endrift.com
Fri, 28 Jul 2017 14:29:56 -0700
commit

5a0a60ba6257742b28e54a47c8a3f0b5909c4fbd

parent

e8871b980f2fb8421b95f922940833a761a4470f

2 files changed, 9 insertions(+), 8 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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");