From d9701a74c5809681b5c03e76636a83ed075a3bb8 Mon Sep 17 00:00:00 2001 From: gnick79 Date: Tue, 21 Dec 2010 01:04:53 +0000 Subject: [PATCH] * 2nd attempt to fix Alpha channel on ClearScreen git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6631 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/BPFunctions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/Src/BPFunctions.cpp b/Source/Core/VideoCommon/Src/BPFunctions.cpp index 91b287ff36..e18748b8a8 100644 --- a/Source/Core/VideoCommon/Src/BPFunctions.cpp +++ b/Source/Core/VideoCommon/Src/BPFunctions.cpp @@ -25,6 +25,7 @@ bool textureChanged[8]; const bool renderFog = false; +u32 prev_pix_format = -1; namespace BPFunctions { @@ -151,8 +152,9 @@ void ClearScreen(const BPCmd &bp, const EFBRectangle &rc) } else // (1): Clear alpha channel to 0xFF if no alpha channel is supposed to be there { - color |= 0xFF000000; + color |= (prev_pix_format == PIXELFMT_RGBA6_Z24) ? 0x0 : 0xFF000000; } + prev_pix_format = bpmem.zcontrol.pixel_format; g_renderer->ClearScreen(rc, colorEnable, alphaEnable, zEnable, color, z); } }