From 4c43da9c231b7c14ba70cb356557cb6b7152df2b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 11 May 2013 15:54:15 -0700 Subject: [PATCH] Only apply the clut offset when using the clut. This may fix games that use the clut offset having wrong colors. --- 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 d40e2c321b..ea5131956b 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -185,7 +185,7 @@ void TextureCache::NotifyFramebufferDestroyed(u32 address, VirtualFramebuffer *f } static u32 GetClutAddr(u32 clutEntrySize) { - return ((gstate.clutaddr & 0xFFFFFF) | ((gstate.clutaddrupper << 8) & 0x0F000000)) + ((gstate.clutformat >> 16) & 0x1f) * clutEntrySize; + return ((gstate.clutaddr & 0xFFFFFF) | ((gstate.clutaddrupper << 8) & 0x0F000000)); } static u32 GetClutIndex(u32 index) {