GB Core: Add reload config option for SGB borders

This commit is contained in:
Vicki Pfau 2020-10-11 22:42:23 -07:00
parent d830e50557
commit f13e06f38c
2 changed files with 6 additions and 1 deletions

View File

@ -277,6 +277,12 @@ static void _GBCoreReloadConfigOption(struct mCore* core, const char* option, co
}
return;
}
if (strcmp("sgb.borders", option) == 0) {
if (mCoreConfigGetIntValue(config, "sgb.borders", &fakeBool)) {
gb->video.sgbBorders = fakeBool;
gb->video.renderer->enableSGBBorder(gb->video.renderer, fakeBool);
}
}
}
static void _GBCoreDesiredVideoDimensions(struct mCore* core, unsigned* width, unsigned* height) {

View File

@ -247,7 +247,6 @@ void GBSGBSerialize(struct GB* gb, struct GBSerializedState* state) {
if (gb->video.renderer->sgbAttributes) {
memcpy(state->sgb.attributes, gb->video.renderer->sgbAttributes, sizeof(state->sgb.attributes));
}
gb->video.renderer->enableSGBBorder(gb->video.renderer, gb->video.sgbBorders);
}
void GBSGBDeserialize(struct GB* gb, const struct GBSerializedState* state) {