From ac49e378d2a716a5da603420f5ba9f20aae52131 Mon Sep 17 00:00:00 2001 From: riccardom Date: Fri, 9 Jan 2009 21:00:06 +0000 Subject: [PATCH] Add a default label to assure that paletteAddress is always initialized. --- desmume/src/OGLRender.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index 943ae9648..f5a309d94 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -592,17 +592,18 @@ static void setTexture(unsigned int format, unsigned int texpal) switch (textureMode) { + case 2: //i2 + paletteAddress = texturePalette<<3; + break; case 1: //a3i5 case 3: //i4 case 4: //i8 case 6: //a5i3 case 7: //16bpp case 5: //4x4 + default: paletteAddress = texturePalette<<4; break; - case 2: //i2 - paletteAddress = texturePalette<<3; - break; } u32 paletteSlot = paletteAddress>>14;