all repos — mgba @ 34c694c9a6ebbce5ab1a86c6fa49d3eded0180e9

mGBA Game Boy Advance Emulator

GBA Video: Fix mosaic objects drawing past the end (fixes #1702)
Vicki Pfau vi@endrift.com
Wed, 13 May 2020 23:31:44 -0700
commit

34c694c9a6ebbce5ab1a86c6fa49d3eded0180e9

parent

dbef26759cdf27bd60ca603c76b415150cc89840

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

jump to
M CHANGESCHANGES

@@ -20,6 +20,7 @@ - GBA SIO: Fix copying Normal mode transfer values

- GBA Timers: Fix deserializing count-up timers - GBA Video: Latch scanline at end of Hblank (fixes mgba.io/i/1319) - GBA Video: Fix Hblank timing + - GBA Video: Fix mosaic objects drawing past the end (fixes mgba.io/i/1702) Other fixes: - Core: Ensure ELF regions can be written before trying - Core: Fix ELF loading regression (fixes mgba.io/i/1669)
M src/gba/renderers/software-obj.csrc/gba/renderers/software-obj.c

@@ -224,7 +224,7 @@ }

int mosaicH = 1; if (GBAObjAttributesAIsMosaic(sprite->a)) { mosaicH = GBAMosaicControlGetObjH(renderer->mosaic) + 1; - if (condition % mosaicH) { + if (condition != end && condition % mosaicH) { condition += mosaicH - (condition % mosaicH); } }