GB Video: Don't rendering negative batches

This commit is contained in:
Vicki Pfau 2021-03-24 18:58:40 -07:00
parent 2a7626f133
commit 1b81c08de8
2 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,7 @@ Other fixes:
- GB Video: Fix SGB video logs - GB Video: Fix SGB video logs
- GB Video: Discard SGB packets in non-SGB mVLs - GB Video: Discard SGB packets in non-SGB mVLs
- GB Video: Fix deserializing negative LX state - 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 multiboot ELF files (fixes mgba.io/i/1949)
- GBA: Fix loading subsequent save files (fixes mgba.io/i/2067) - GBA: Fix loading subsequent save files (fixes mgba.io/i/2067)
- mGUI: Don't attempt to preload files larger than can fit in RAM - mGUI: Don't attempt to preload files larger than can fit in RAM

View File

@ -565,6 +565,9 @@ static void GBVideoSoftwareRendererDrawRange(struct GBVideoRenderer* renderer, i
struct GBVideoSoftwareRenderer* softwareRenderer = (struct GBVideoSoftwareRenderer*) renderer; struct GBVideoSoftwareRenderer* softwareRenderer = (struct GBVideoSoftwareRenderer*) renderer;
softwareRenderer->lastY = y; softwareRenderer->lastY = y;
softwareRenderer->lastX = endX; softwareRenderer->lastX = endX;
if (startX >= endX) {
return;
}
uint8_t* maps = &softwareRenderer->d.vram[GB_BASE_MAP]; uint8_t* maps = &softwareRenderer->d.vram[GB_BASE_MAP];
if (GBRegisterLCDCIsTileMap(softwareRenderer->lcdc)) { if (GBRegisterLCDCIsTileMap(softwareRenderer->lcdc)) {
maps += GB_SIZE_MAP; maps += GB_SIZE_MAP;