all repos — mgba @ 336993497dbf1bd02202b2100da5d724bcfaea02

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

336993497dbf1bd02202b2100da5d724bcfaea02

parent

c3aededf05edf9337f89191dfdbfc3189885fb14

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

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

@@ -523,7 +523,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 {

@@ -532,7 +532,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); } }