From 8fb37c603677cc682766826cf73bfecbeca14c5d Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 14 Aug 2021 15:51:44 -0700 Subject: [PATCH] GBA Video: Swap priority and window rendering order --- src/gba/renderers/video-software.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 0e4e75126..5fc61f076 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -570,12 +570,12 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render int w; unsigned priority; - for (priority = 0; priority < 4; ++priority) { - softwareRenderer->end = 0; - for (w = 0; w < softwareRenderer->nWindows; ++w) { - softwareRenderer->start = softwareRenderer->end; - softwareRenderer->end = softwareRenderer->windows[w].endX; - softwareRenderer->currentWindow = softwareRenderer->windows[w].control; + softwareRenderer->end = 0; + for (w = 0; w < softwareRenderer->nWindows; ++w) { + softwareRenderer->start = softwareRenderer->end; + softwareRenderer->end = softwareRenderer->windows[w].endX; + softwareRenderer->currentWindow = softwareRenderer->windows[w].control; + for (priority = 0; priority < 4; ++priority) { if (spriteLayers & (1 << priority)) { GBAVideoSoftwareRendererPostprocessSprite(softwareRenderer, priority); }