Skip to content

Commit

Permalink
GBA Video: Ignore disabled backgrounds as OBJ blend target (fixes #2489)
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed Nov 8, 2022
1 parent 838e4a1 commit 20c16bc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES
@@ -1,6 +1,7 @@
0.10.1: (Future)
Emulation fixes:
- GB Serialize: Don't write BGP/OBP when loading SCGB state (fixes mgba.io/i/2694)
- GBA Video: Ignore disabled backgrounds as OBJ blend target (fixes mgba.io/i/2489)
Other fixes:
- Qt: Manually split filename to avoid overzealous splitting (fixes mgba.io/i/2681)
- Qt: Expand criteria for tag branch names (fixes mgba.io/i/2679)
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions cinema/gba/blend/disabled-bg-semitrans-blend/config.ini
@@ -0,0 +1,3 @@
[testinfo]
skip=10
frames=1
Binary file not shown.
8 changes: 4 additions & 4 deletions src/gba/renderers/software-obj.c
Expand Up @@ -169,10 +169,10 @@ int GBAVideoSoftwareRendererPreprocessSprite(struct GBAVideoSoftwareRenderer* re
(renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN);
if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT || (renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || objwinSlowPath) {
int target2 = renderer->target2Bd;
target2 |= renderer->bg[0].target2;
target2 |= renderer->bg[1].target2;
target2 |= renderer->bg[2].target2;
target2 |= renderer->bg[3].target2;
target2 |= renderer->bg[0].target2 && renderer->bg[0].enabled;
target2 |= renderer->bg[1].target2 && renderer->bg[1].enabled;
target2 |= renderer->bg[2].target2 && renderer->bg[2].enabled;
target2 |= renderer->bg[3].target2 && renderer->bg[3].enabled;
if (target2) {
renderer->forceTarget1 = true;
flags |= FLAG_REBLEND;
Expand Down

0 comments on commit 20c16bc

Please sign in to comment.