GB Core: Fix palette loading when loading a foreign config

This commit is contained in:
Vicki Pfau 2017-07-28 14:29:56 -07:00
parent 64eb253c50
commit 0c0fab5402
2 changed files with 9 additions and 8 deletions

View File

@ -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)

View File

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