diff options
| author | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-06-19 21:12:09 +0000 |
|---|---|---|
| committer | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-06-19 21:12:09 +0000 |
| commit | 4ab0e4b8a06f9261d858bbd637780cc7ff1a527d (patch) | |
| tree | 5c4cd5e617c611ea6d61b0f0a1ca26a5b62bab2b /Source/Core/VideoCommon/Src/TextureDecoder.cpp | |
| parent | 208c33f09c6e2ea3810cf89e84aac86bf2496b37 (diff) | |
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
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureDecoder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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) |
