From a651a91aa15d0ba99dc97eb84685221146cc1c03 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 f08a29dce..eb8f60bbf 100644 --- a/CHANGES +++ b/CHANGES @@ -53,6 +53,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: Handle saving input settings better diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 54a409724..2a5419eb2 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -1616,7 +1616,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;