summaryrefslogtreecommitdiffstats
path: root/src/glx/apple/apple_glx_context.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/apple/apple_glx_context.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/apple/apple_glx_context.c')
-rw-r--r--src/glx/apple/apple_glx_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glx/apple/apple_glx_context.c b/src/glx/apple/apple_glx_context.c
index 5650b4f3291..ff66ed499bf 100644
--- a/src/glx/apple/apple_glx_context.c
+++ b/src/glx/apple/apple_glx_context.c
@@ -55,6 +55,8 @@
#include "apple_cgl.h"
#include "apple_glx_drawable.h"
+#include "util/debug.h"
+
static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER;
/*
@@ -181,7 +183,7 @@ apple_glx_create_context(void **ptr, Display * dpy, int screen,
*x11errorptr = false;
}
- if (getenv("LIBGL_DIAGNOSTIC"))
+ if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false))
fprintf(stderr, "error: %s\n", apple_cgl.error_string(error));
return true;