diff --git a/CHANGES b/CHANGES index b32a25c02..fa1ba97e0 100644 --- a/CHANGES +++ b/CHANGES @@ -27,6 +27,7 @@ Bugfixes: - GBA Video: Fix blend issues with obscured middle layers - Video: Ensure FFmpeg encoder has audio frames - Video: Fix uncompressed PCM audio recording + - GBA Video: Fix windows not disabling target 1 appropriately (fixes #161) Misc: - Qt: Disable sync to video by default - GBA: Exit cleanly on FATAL if the port supports it diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 76be4d1b5..91bd20e41 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -1276,7 +1276,7 @@ static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, stru unsigned xBase; int flags = (background->priority << OFFSET_PRIORITY) | (background->index << OFFSET_INDEX) | FLAG_IS_BACKGROUND; - flags |= FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA); + flags |= FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed)); flags |= FLAG_TARGET_2 * background->target2; if (renderer->blda == 0x10 && renderer->bldb == 0) { flags &= ~(FLAG_TARGET_1 | FLAG_TARGET_2); @@ -1349,7 +1349,7 @@ static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, stru int32_t localY; \ \ int flags = (background->priority << OFFSET_PRIORITY) | (background->index << OFFSET_INDEX) | FLAG_IS_BACKGROUND; \ - flags |= FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA); \ + flags |= FLAG_TARGET_1 * (background->target1 && renderer->blendEffect == BLEND_ALPHA && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed)); \ flags |= FLAG_TARGET_2 * background->target2; \ if (renderer->blda == 0x10 && renderer->bldb == 0) { \ flags &= ~(FLAG_TARGET_1 | FLAG_TARGET_2); \