GBA Video: Fix another merge casualty
Vicki Pfau vi@endrift.com
Fri, 17 Jul 2020 00:22:59 -0700
1 files changed,
5 insertions(+),
1 deletions(-)
M
src/gba/renderers/software-mode0.c
→
src/gba/renderers/software-mode0.c
@@ -14,7 +14,11 @@ xBase += (localX & 0x100) << 5; \
} \ screenBase = background->screenBase + yBase + (xBase >> 2); \ uint16_t* screenBlock = renderer->d.vramBG[screenBase >> VRAM_BLOCK_OFFSET]; \ - LOAD_16(mapData, screenBase & VRAM_BLOCK_MASK, screenBlock); \ + if (LIKELY(screenBlock)) { \ + LOAD_16(mapData, screenBase & VRAM_BLOCK_MASK, screenBlock); \ + } else { \ + mapData = 0; \ + } #define DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_16(BLEND, OBJWIN) \ paletteData = GBA_TEXT_MAP_PALETTE(mapData) << 4; \