From d0b9a755cdb3f18259660dee7e231f67ce14cf74 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 30 May 2003 23:15:53 +0000 Subject: [PATCH] fix logging crash (only showed up in release builds run under Win98) --- stepmania/src/RageDisplay_OGL.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 97474d1333..82f841a07b 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -279,12 +279,14 @@ static void CheckPalettedTextures() goto fail; } - GLint size = 0; - glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &size); - if(size != 8) - { - error = ssprintf("Expected an 8-bit palette, got a %i-bit one instead", size); - goto fail; + { // in brackets to hush VC6 error + GLint size = 0; + glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &size); + if(size != 8) + { + error = ssprintf("Expected an 8-bit palette, got a %i-bit one instead", size); + goto fail; + } } return; @@ -292,7 +294,7 @@ static void CheckPalettedTextures() fail: GLExt::glColorTableEXT = NULL; GLExt::glGetColorTableParameterivEXT = NULL; - LOG->Info("Paletted textures disabled: %s.", error); + LOG->Info("Paletted textures disabled: %s.", error.c_str()); } void SetupExtensions()