summaryrefslogtreecommitdiffstats
path: root/src/glx/glxext.c
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-09-08 11:45:23 +0100
committerEric Engestrom <[email protected]>2017-09-12 13:53:11 +0100
commitf4a9d205d8a6474defa86dc4f12b7e63e61a49d9 (patch)
tree23e1de3f27f353811fc0a9196c1f78c2c6010306 /src/glx/glxext.c
parent6ea8db5b4ca467717b2fd4b69fc8b97fe29ffe1f (diff)
glx: turn LIBGL_DIAGNOSTIC into a boolean
Instead of setting based on set/unset, allow users to use boolean values. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/glx/glxext.c')
-rw-r--r--src/glx/glxext.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 9cbe3347723..3431f3e5cae 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -38,6 +38,8 @@
*/
#include <assert.h>
+#include <stdbool.h>
+
#include "glxclient.h"
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
@@ -47,6 +49,8 @@
#endif
#include "glxextensions.h"
+#include "util/debug.h"
+
#include <X11/Xlib-xcb.h>
#include <xcb/xcb.h>
#include <xcb/glx.h>
@@ -577,7 +581,7 @@ __glXInitializeVisualConfigFromTags(struct glx_config * config, int count,
i = count;
break;
default:
- if(getenv("LIBGL_DIAGNOSTIC")) {
+ if(env_var_as_boolean("LIBGL_DIAGNOSTIC", false)) {
long int tagvalue = *bp++;
fprintf(stderr, "WARNING: unknown GLX tag from server: "
"tag 0x%lx value 0x%lx\n", tag, tagvalue);