all repos — mgba @ 3a38abdfce0ec5933bd91b3929cd092312b09965

mGBA Game Boy Advance Emulator

GBA Video: Fix another blending regression
Jeffrey Pfau jeffrey@endrift.com
Sat, 19 Sep 2015 18:19:21 -0700
commit

3a38abdfce0ec5933bd91b3929cd092312b09965

parent

cf7b100f014b79f1dcae3ba6106d0faad4be2812

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -520,7 +520,7 @@

if (softwareRenderer->target2Bd) { x = 0; for (w = 0; w < softwareRenderer->nWindows; ++w) { - uint32_t backdrop = FLAG_UNWRITTEN; + uint32_t backdrop = 0; if (!softwareRenderer->target1Bd || softwareRenderer->blendEffect == BLEND_NONE || softwareRenderer->blendEffect == BLEND_ALPHA || !GBAWindowControlIsBlendEnable(softwareRenderer->windows[w].control.packed)) { backdrop |= softwareRenderer->normalPalette[0]; } else {

@@ -529,7 +529,7 @@ }

int end = softwareRenderer->windows[w].endX; for (; x < end; ++x) { uint32_t color = softwareRenderer->row[x]; - if (color & FLAG_TARGET_1 && color & FLAG_UNWRITTEN) { + if (color & FLAG_TARGET_1) { softwareRenderer->row[x] = _mix(softwareRenderer->bldb, backdrop, softwareRenderer->blda, color); } }