From cace547f8a0215fb89d458aecb0fb37d149cfff9 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Thu, 15 Nov 2012 01:47:59 +0100 Subject: [PATCH] Fix colors for textures with 5551 clut Fixes NAMCO logo in the Tales of Eternia intro, which is now red. --- GPU/GLES/TextureCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 4c0135258c..6066af4fb9 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -477,7 +477,7 @@ void convertColors(u8 *finalBuf, GLuint dstFmt, int numPixels) u16 *p = (u16 *)finalBuf; for (int i = 0; i < numPixels; i++) { u16 c = p[i]; - p[i] = ((c & 0x8000) >> 15) | (c << 1); + p[i] = ((c & 0x8000) >> 15) | ((c >> 9) & 0x3E) | ((c << 1) & 0x7C0) | ((c << 11) & 0xF800); } } break;