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 8b8ff65821
commit ba566f334d
2 changed files with 6 additions and 1 deletions

View File

@ -292,6 +292,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(const struct mCore* core, unsigned* width, unsigned* height) {

View File

@ -256,7 +256,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) {