]> git.cworth.org Git - glenv/blobdiff - glenv.c
Implement --query option
[glenv] / glenv.c
diff --git a/glenv.c b/glenv.c
index 824b8b8bfaf697a3131added5ca149c2a1fbbaf3..6d27ad4bf402b6d380d619bb9730b50443714c76 100644 (file)
--- a/glenv.c
+++ b/glenv.c
@@ -41,10 +41,9 @@ typedef struct options {
 static void
 export_options (options_t *options)
 {
-       if (options->query)
-               setenv ("GLENV_QUERY", "1", 1);
-       else
-               unsetenv ("GLENV_QUERY");
+       if (options->query) {
+               glaze_set_first_gl_call_callback ("glenv_query");
+       }
 
        if (options->vendor)
                setenv ("GLENV_GL_VENDOR", options->vendor, 1);