GBA Video: Fix scanline cache with scale factor change edge cases
Vicki Pfau vi@endrift.com
Sat, 09 Mar 2019 11:27:52 -0800
2 files changed,
9 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -12,6 +12,7 @@ - GBA BIOS: Fix multiboot entry point (fixes Magic Floor)
- GB Video: Delay LYC STAT check (fixes mgba.io/i/1331) - GB Video: Fix window being enabled mid-scanline (fixes mgba.io/i/1328) - GB I/O: Filter IE top bits properly (fixes mgba.io/i/1329) + - GBA Video: Fix scanline cache with scale factor change edge cases Other fixes: - Qt: More app metadata fixes - Qt: Fix load recent from archive (fixes mgba.io/i/1325)
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -539,6 +539,14 @@ memcpy(softwareRenderer->cache[y].io, softwareRenderer->nextIo, sizeof(softwareRenderer->nextIo));
dirty = true; } + if (GBARegisterDISPCNTGetMode(softwareRenderer->dispcnt) != 0) { + if (softwareRenderer->cache[y].scale[0][0] != softwareRenderer->bg[2].sx || + softwareRenderer->cache[y].scale[0][1] != softwareRenderer->bg[2].sy || + softwareRenderer->cache[y].scale[1][0] != softwareRenderer->bg[3].sx || + softwareRenderer->cache[y].scale[1][1] != softwareRenderer->bg[3].sy) { + dirty = true; + } + } softwareRenderer->cache[y].scale[0][0] = softwareRenderer->bg[2].sx; softwareRenderer->cache[y].scale[0][1] = softwareRenderer->bg[2].sy; softwareRenderer->cache[y].scale[1][0] = softwareRenderer->bg[3].sx;