GBA Video: WIN0/1 take priority over OBJWIN

This commit is contained in:
Jeffrey Pfau 2016-08-14 04:19:08 -07:00
parent 476b34ce07
commit 6797cbe6b1
2 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@ Bugfixes:
- PSP2: Fix gyroscope direction
- Qt: Fix hanging key press after disabling autofire
- PSP2: Delete threads after they return
- GBA Video: WIN0/1 take priority over OBJWIN
Misc:
- 3DS: Use blip_add_delta_fast for a small speed improvement
- OpenGL: Log shader compilation failure

View File

@ -142,6 +142,9 @@ int GBAVideoSoftwareRendererPreprocessSprite(struct GBAVideoSoftwareRenderer* re
uint32_t flags = GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY;
flags |= FLAG_TARGET_1 * ((GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT);
flags |= FLAG_OBJWIN * (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_OBJWIN);
if ((flags & FLAG_OBJWIN) && renderer->currentWindow.priority < renderer->objwin.priority) {
return 0;
}
int32_t x = (uint32_t) GBAObjAttributesBGetX(sprite->b) << 23;
x >>= 23;
uint16_t* vramBase = &renderer->d.vram[BASE_TILE >> 1];