fix logging crash (only showed up in release builds run under Win98)
This commit is contained in:
@@ -279,12 +279,14 @@ static void CheckPalettedTextures()
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLint size = 0;
|
{ // in brackets to hush VC6 error
|
||||||
glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &size);
|
GLint size = 0;
|
||||||
if(size != 8)
|
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;
|
error = ssprintf("Expected an 8-bit palette, got a %i-bit one instead", size);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -292,7 +294,7 @@ static void CheckPalettedTextures()
|
|||||||
fail:
|
fail:
|
||||||
GLExt::glColorTableEXT = NULL;
|
GLExt::glColorTableEXT = NULL;
|
||||||
GLExt::glGetColorTableParameterivEXT = NULL;
|
GLExt::glGetColorTableParameterivEXT = NULL;
|
||||||
LOG->Info("Paletted textures disabled: %s.", error);
|
LOG->Info("Paletted textures disabled: %s.", error.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupExtensions()
|
void SetupExtensions()
|
||||||
|
|||||||
Reference in New Issue
Block a user