all repos — mgba @ 0c0fab5402726e988a1335539008a03012dea844

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

0c0fab5402726e988a1335539008a03012dea844

parent

64eb253c50e23a9fd0f637ee401b939a2de21a78

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

jump to
M CHANGESCHANGES

@@ -13,6 +13,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: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
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");