From 8e43ffed9041775e7daf427eef9a047812743a1e Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 15 Oct 2013 22:58:47 -0700 Subject: [PATCH] Adjust scaling/rotation state for backgrounds regardless of if they were actually drawn --- src/gba/renderers/video-software.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index fe9217cd3..9faa9ccdc 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -597,8 +597,6 @@ static void _drawScanline(struct GBAVideoSoftwareRenderer* renderer, int y) { _drawBackgroundMode5(renderer, &renderer->bg[2], y); break; } - renderer->bg[2].sx += renderer->bg[2].dmx; - renderer->bg[2].sy += renderer->bg[2].dmy; } if (TEST_LAYER_ENABLED(3)) { switch (renderer->dispcnt.mode) { @@ -609,11 +607,13 @@ static void _drawScanline(struct GBAVideoSoftwareRenderer* renderer, int y) { _drawBackgroundMode2(renderer, &renderer->bg[3], y); break; } - renderer->bg[3].sx += renderer->bg[3].dmx; - renderer->bg[3].sy += renderer->bg[3].dmy; } } } + renderer->bg[2].sx += renderer->bg[2].dmx; + renderer->bg[2].sy += renderer->bg[2].dmy; + renderer->bg[3].sx += renderer->bg[3].dmx; + renderer->bg[3].sy += renderer->bg[3].dmy; } static void _composite(struct GBAVideoSoftwareRenderer* renderer, int offset, uint32_t color, uint32_t current) {