all repos — mgba @ 1b81c08de8fd10035d5ae060b81747c6b880c906

mGBA Game Boy Advance Emulator

GB Video: Don't rendering negative batches
Vicki Pfau vi@endrift.com
Wed, 24 Mar 2021 18:58:40 -0700
commit

1b81c08de8fd10035d5ae060b81747c6b880c906

parent

2a7626f1336048e4ad25c2af3b1f2118d97b4fe8

2 files changed, 4 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -89,6 +89,7 @@ - GB Serialize: Fix crash when loading pre-0.7 SGB savestates

- GB Video: Fix SGB video logs - GB Video: Discard SGB packets in non-SGB mVLs - GB Video: Fix deserializing negative LX state + - GB Video: Don't rendering negative batches - GBA: Fix loading multiboot ELF files (fixes mgba.io/i/1949) - GBA: Fix loading subsequent save files (fixes mgba.io/i/2067) - mGUI: Don't attempt to preload files larger than can fit in RAM
M src/gb/renderers/software.csrc/gb/renderers/software.c

@@ -565,6 +565,9 @@ static void GBVideoSoftwareRendererDrawRange(struct GBVideoRenderer* renderer, int startX, int endX, int y) {

struct GBVideoSoftwareRenderer* softwareRenderer = (struct GBVideoSoftwareRenderer*) renderer; softwareRenderer->lastY = y; softwareRenderer->lastX = endX; + if (startX >= endX) { + return; + } uint8_t* maps = &softwareRenderer->d.vram[GB_BASE_MAP]; if (GBRegisterLCDCIsTileMap(softwareRenderer->lcdc)) { maps += GB_SIZE_MAP;