GBA Video: Fix effects blending improperly in some non-last windows

This commit is contained in:
Vicki Pfau 2019-12-31 00:20:53 -08:00
parent ed2353ff76
commit b6f863be26
2 changed files with 3 additions and 1 deletions

View File

@ -94,6 +94,7 @@ Emulation fixes:
- GBA Memory: Fix open bus from IWRAM (fixes mgba.io/i/1575)
- GBA Video: Fix OpenGL renderer 512x512 backgrounds (fixes mgba.io/i/1572)
- GBA Video: Fix BLDY for semitransparent sprite on non-target-2 backgrounds
- GBA Video: Fix effects blending improperly in some non-last windows
Other fixes:
- 3DS: Fix screen darkening (fixes mgba.io/i/1562)
- Core: Fix uninitialized memory issues with graphics caches

View File

@ -652,10 +652,11 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
}
}
for (w = 0; w < softwareRenderer->nWindows; ++w) {
int end = softwareRenderer->windows[w].endX;
if (!GBAWindowControlIsBlendEnable(softwareRenderer->windows[w].control.packed)) {
x = end;
continue;
}
int end = softwareRenderer->windows[w].endX;
if (softwareRenderer->blendEffect == BLEND_DARKEN) {
for (; x < end; ++x) {
uint32_t color = softwareRenderer->row[x];