GBA Video: Fix rare regression blending semitransparent sprites (fixes #1876)
Vicki Pfau vi@endrift.com
Mon, 07 Sep 2020 01:20:22 -0700
9 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
CHANGES
→
CHANGES
@@ -43,6 +43,7 @@ - GBA Video: Fix Hblank timing
- GBA Video: Invalidate map cache when modifying BGCNT (fixes mgba.io/i/1846) - GBA Video: Don't draw sprites using unmapped VRAM in GL renderer (fixes mgba.io/i/1865) - GBA Video: Implement green swap (fixes mgba.io/i/1609) + - GBA Video: Fix rare regression blending semitransparent sprites (fixes mgba.io/i/1876) - SM83: Emulate HALT bug Other fixes: - 3DS: Redo video sync to be more precise
M
src/gba/renderers/software-obj.c
→
src/gba/renderers/software-obj.c
@@ -162,7 +162,7 @@ return 0;
} int objwinSlowPath = GBARegisterDISPCNTIsObjwinEnable(renderer->dispcnt) && GBAWindowControlGetBlendEnable(renderer->objwin.packed) != GBAWindowControlIsBlendEnable(renderer->currentWindow.packed); - int variant = (renderer->target1Obj || GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) && + int variant = renderer->target1Obj && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT || (renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || objwinSlowPath) {