From a92d02c75616cd73de94226de62f7dae88e5c908 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 9 May 2015 17:28:13 -0700 Subject: [PATCH] GBA Video: Fix second frame mode 5 --- CHANGES | 1 + src/gba/renderers/video-software.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 35d7fdb1d..52e77c6df 100644 --- a/CHANGES +++ b/CHANGES @@ -34,6 +34,7 @@ Bugfixes: - ARM7: Fix ARM multiply instructions when PC is a destination register - SDL: Fix potential build issues when Qt and SDL2 are in use - GBA Memory: Fix jumping to invalid memory when switching from Thumb to ARM + - GBA Video: Fix second frame mode 5 Misc: - Qt: Show multiplayer numbers in window title - Qt: Solar sensor can have shortcuts set diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index eb8a1d193..f04db8bb2 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -1608,7 +1608,7 @@ static void _drawBackgroundMode5(struct GBAVideoSoftwareRenderer* renderer, stru BACKGROUND_BITMAP_ITERATE(160, 128); if (!mosaicWait) { - LOAD_16(color, (offset + (localX >> 8) + (localY >> 8) * 160) << 1, renderer->d.vram); + LOAD_16(color, offset + (localX >> 8) * 2 + (localY >> 8) * 320, renderer->d.vram); #ifndef COLOR_16_BIT unsigned color32 = 0; color32 |= (color << 9) & 0xF80000;