all repos — mgba @ f29cff2e2f36b8af71d88052cf8d3e26056d6c11

mGBA Game Boy Advance Emulator

GB Video: Only redraw SGB border when MASK is disabled (fixes #1034)
Vicki Pfau vi@endrift.com
Sat, 21 Apr 2018 17:05:59 -0700
commit

f29cff2e2f36b8af71d88052cf8d3e26056d6c11

parent

4101fe54c670616fc4e5bc7416b3c98fa7aad102

1 files changed, 9 insertions(+), 3 deletions(-)

jump to
M src/gb/renderers/software.csrc/gb/renderers/software.c

@@ -326,10 +326,14 @@ }

break; case SGB_ATRC_EN: - if (softwareRenderer->sgbBorders) { + if (softwareRenderer->sgbBorders && !renderer->sgbRenderMode) { _regenerateSGBBorder(softwareRenderer); } break; + case SGB_MASK_EN: + if (!renderer->sgbRenderMode) { + _regenerateSGBBorder(softwareRenderer); + } } }

@@ -356,7 +360,9 @@ renderer->writePalette(renderer, 0x40, value);

renderer->writePalette(renderer, 0x50, value); renderer->writePalette(renderer, 0x60, value); renderer->writePalette(renderer, 0x70, value); - _regenerateSGBBorder(softwareRenderer); + if (!renderer->sgbRenderMode) { + _regenerateSGBBorder(softwareRenderer); + } } }

@@ -572,7 +578,7 @@ break;

case SGB_PAL_TRN: case SGB_CHR_TRN: case SGB_PCT_TRN: - if (softwareRenderer->sgbTransfer > 0 && softwareRenderer->sgbBorders) { + if (softwareRenderer->sgbTransfer > 0 && softwareRenderer->sgbBorders && !renderer->sgbRenderMode) { // Make sure every buffer sees this if we're multibuffering _regenerateSGBBorder(softwareRenderer); }