From 4ab0e4b8a06f9261d858bbd637780cc7ff1a527d Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Sat, 19 Jun 2010 21:12:09 +0000 Subject: fix for rbga8 decoding that causes problems in nsmbw fix for screen clearing in opengl and d3d git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5749 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/TextureDecoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.cpp') diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index e8dc98b21d..91cf47b7f9 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -626,9 +626,9 @@ inline void decodebytesARGB8_4(u32 *dst, const u16 *src, const u16 *src2) inline void decodebytesARGB8_4ToRgba(u32 *dst, const u16 *src, const u16 *src2) { - for (int x = 0; x < 4; x++) { - dst[x] = (src2[x] << 8) | src[x] >> 8 | (src[x] & 0xF) << 24; - } + for (int x = 0; x < 4; x++) { + dst[x] = ((src[x] & 0xFF) << 24) | ((src[x] & 0xFF00)>>8) | (src2[x] << 8); + } } inline u32 makecol(int r, int g, int b, int a) -- cgit v1.2.3