all repos — mgba @ f13e06f38cd4005ab76002b45f7b47308d75ca47

mGBA Game Boy Advance Emulator

GB Core: Add reload config option for SGB borders
Vicki Pfau vi@endrift.com
Sun, 11 Oct 2020 22:42:23 -0700
commit

f13e06f38cd4005ab76002b45f7b47308d75ca47

parent

d830e505576798d4c85b837a3ab51b64ced3d028

2 files changed, 6 insertions(+), 1 deletions(-)

jump to
M src/gb/core.csrc/gb/core.c

@@ -277,6 +277,12 @@ gb->allowOpposingDirections = fakeBool;

} 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) {
M src/gb/serialize.csrc/gb/serialize.c

@@ -247,7 +247,6 @@ }

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