From 9d5bfd85824628e8a1a6b069fb4febb4dae1a969 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 28 Jul 2021 22:32:12 -0700 Subject: [PATCH] GB Video: Render SGB border when unmasking with ATTR/PAL_SET (fixes #2261) --- CHANGES | 1 + src/gb/renderers/software.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index 128eabbc1..13109f5fe 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ 0.9.3: (Future) Emulation fixes: + - GB Video: Render SGB border when unmasking with ATTR/PAL_SET (fixes mgba.io/i/2261) - GBA SIO: Fix SI value for unattached MULTI mode - GBA Video: Fix backdrop color if DISPCNT is first set to 0 (fixes mgba.io/i/2260) Other fixes: diff --git a/src/gb/renderers/software.c b/src/gb/renderers/software.c index f023d99b4..a8fca9e39 100644 --- a/src/gb/renderers/software.c +++ b/src/gb/renderers/software.c @@ -780,6 +780,9 @@ static void GBVideoSoftwareRendererFinishFrame(struct GBVideoRenderer* renderer) case SGB_ATTR_SET: if (softwareRenderer->sgbPacket[1] & 0x40) { renderer->sgbRenderMode = 0; + if (softwareRenderer->sgbBorders) { + _regenerateSGBBorder(softwareRenderer); + } } break; case SGB_PAL_TRN: