From 7e2e4be2e3eb72287ea641121253397dc9e9f7f9 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 23 Dec 2014 00:10:08 -0800 Subject: [PATCH] GBA Video: Fix blend issues with obscured middle layers Conflicts: CHANGES --- CHANGES | 1 + src/gba/renderers/video-software.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 0b47ab762..4ade8403e 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ Bugfixes: - GBA Memory: Properly initialize 1 Mb flash, and add debug logging - Qt: Properly set default video recording settings - GBA Audio: Make larger buffer sizes than 2048 actually work properly + - GBA Video: Fix blend issues with obscured middle layers Misc: - Qt: Disable sync to video by default - GBA: Exit cleanly on FATAL if the port supports it diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 454d3f5e3..76be4d1b5 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -1303,7 +1303,7 @@ static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, stru uint16_t* vram = renderer->d.vram; if (!objwinSlowPath) { - if (!(flags & FLAG_TARGET_2)) { + if (!(flags & FLAG_TARGET_2) && renderer->blendEffect != BLEND_ALPHA) { if (!background->multipalette) { DRAW_BACKGROUND_MODE_0(16, NoBlend, NO_OBJWIN); } else { @@ -1317,7 +1317,7 @@ static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, stru } } } else { - if (!(flags & FLAG_TARGET_2)) { + if (!(flags & FLAG_TARGET_2) && renderer->blendEffect != BLEND_ALPHA) { if (!background->multipalette) { DRAW_BACKGROUND_MODE_0(16, NoBlend, OBJWIN); } else {