summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxdd.c
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2003-11-18 12:18:13 +0000
committerDaniel Borca <[email protected]>2003-11-18 12:18:13 +0000
commitef563d011b5a11dc5f7a0da6445e68f14cc33062 (patch)
treeb61e2f338d71c77f3a9a565f146efc9070c5317e /src/mesa/drivers/glide/fxdd.c
parentaa0d6dcd652ca3f6ece2e9314020283589d79a2a (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.c30
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;