GB Video: Don't rendering negative batches
Vicki Pfau vi@endrift.com
Wed, 24 Mar 2021 18:58:40 -0700
2 files changed,
4 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -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.c
→
src/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;