From e1d5f3f457972dd5eff1c1d139edb5c0c9bc8066 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 22 Apr 2013 02:07:19 -0700 Subject: [PATCH] Fix drawing wide backgrounds --- src/gba/renderers/video-software.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 814c5462c..5eb0cb842 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -216,7 +216,7 @@ static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, stru for (int outX = start; outX < end; ++outX) { xBase = (outX + inX) & 0xF8; if (background->size & 1) { - xBase += ((outX + inX) & 0x100) << 3; + xBase += ((outX + inX) & 0x100) << 5; } screenBase = (background->screenBase >> 1) + (xBase >> 3) + (yBase << 2); mapData.packed = renderer->d.vram[screenBase];