diff options
author | Daniel Borca <[email protected]> | 2003-11-18 12:18:13 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2003-11-18 12:18:13 +0000 |
commit | ef563d011b5a11dc5f7a0da6445e68f14cc33062 (patch) | |
tree | b61e2f338d71c77f3a9a565f146efc9070c5317e /src/mesa/drivers/glide/fxdd.c | |
parent | aa0d6dcd652ca3f6ece2e9314020283589d79a2a (diff) |
doc updates; GLUT timer additions; fixed compilation warnings
Diffstat (limited to 'src/mesa/drivers/glide/fxdd.c')
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index e4f76374318..f4090122f5a 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1220,26 +1220,22 @@ fxDDGetString(GLcontext * ctx, GLenum name) return (GLubyte *)fxMesa->rendererString; #if 0 /* hack to advertise vanilla extension names */ case GL_EXTENSIONS: - { - static const GLubyte *ext = NULL; - if (ext == NULL) { - GLubyte *x = _mesa_make_extension_string(ctx); - if (x != NULL) { - ext = _mesa_malloc(strlen((char *)x) + 1024); - if (ext != NULL) { - strcpy((char *)ext, (char *)x); + if (ctx->Extensions.String == NULL) { + GLubyte *ext = _mesa_make_extension_string(ctx); + if (ext != NULL) { + ctx->Extensions.String = _mesa_malloc(strlen((char *)ext) + 256); + if (ctx->Extensions.String != NULL) { + strcpy((char *)ctx->Extensions.String, (char *)ext); #if 0 /* put any additional extension names here */ - strcat((char *)ext, " 3DFX_set_global_palette"); + strcat((char *)ctx->Extensions.String, " 3DFX_set_global_palette"); #endif - _mesa_free(x); - } else { - ext = x; - } - ctx->Extensions.String = ext; - } - } - return ext; + _mesa_free(ext); + } else { + ctx->Extensions.String = ext; + } + } } + return ctx->Extensions.String; #endif default: return NULL; |