mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Restore a fixed version of a removed optimization
This commit is contained in:
parent
4525047196
commit
cf7b100f01
|
@ -473,6 +473,10 @@ void GBAVideoSoftwareRendererDrawBackgroundMode0(struct GBAVideoSoftwareRenderer
|
||||||
int objwinFlags = FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA && GBAWindowControlIsBlendEnable(renderer->objwin.packed));
|
int objwinFlags = FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA && GBAWindowControlIsBlendEnable(renderer->objwin.packed));
|
||||||
objwinFlags |= flags;
|
objwinFlags |= flags;
|
||||||
flags |= FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed));
|
flags |= FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed));
|
||||||
|
if (renderer->blendEffect == BLEND_ALPHA && renderer->blda == 0x10 && renderer->bldb == 0) {
|
||||||
|
flags &= ~(FLAG_TARGET_1 | FLAG_TARGET_2);
|
||||||
|
objwinFlags &= ~(FLAG_TARGET_1 | FLAG_TARGET_2);
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t screenBase;
|
uint32_t screenBase;
|
||||||
uint32_t charBase;
|
uint32_t charBase;
|
||||||
|
|
|
@ -184,6 +184,10 @@ static inline void _compositeNoBlendNoObjwin(struct GBAVideoSoftwareRenderer* re
|
||||||
objwinFlags |= flags; \
|
objwinFlags |= flags; \
|
||||||
flags |= FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA && \
|
flags |= FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA && \
|
||||||
GBAWindowControlIsBlendEnable(renderer->currentWindow.packed)); \
|
GBAWindowControlIsBlendEnable(renderer->currentWindow.packed)); \
|
||||||
|
if (renderer->blendEffect == BLEND_ALPHA && renderer->blda == 0x10 && renderer->bldb == 0) { \
|
||||||
|
flags &= ~(FLAG_TARGET_1 | FLAG_TARGET_2); \
|
||||||
|
objwinFlags &= ~(FLAG_TARGET_1 | FLAG_TARGET_2); \
|
||||||
|
} \
|
||||||
int variant = background->target1 && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && \
|
int variant = background->target1 && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && \
|
||||||
(renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); \
|
(renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); \
|
||||||
color_t* palette = renderer->normalPalette; \
|
color_t* palette = renderer->normalPalette; \
|
||||||
|
|
Loading…
Reference in New Issue