diff options
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureDecoder.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index de8e383f91..a7a5356dce 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -65,11 +65,12 @@ int TexDecoder_GetTextureSizeInBytes(int width, int height, int format) return (width * height * TexDecoder_GetTexelSizeInNibbles(format)) / 2; } -u32 TexDecoder_GetTlutHash(const u16 *src, int len) +u32 TexDecoder_GetTlutHash(const u8* src, int len) { u32 hash = 0xbeefbabe; - for (int i = 0; i < len / 2; i += 2) { - hash = _rotl(hash, 17) ^ ((u32 *)src)[i]; + for (int i = 0; i < len ; i++) { + hash = _rotl(hash, 7) ^ src[i]; + hash += 7; } return hash; } |
