From f4a9d205d8a6474defa86dc4f12b7e63e61a49d9 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 8 Sep 2017 11:45:23 +0100 Subject: 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 Reviewed-by: Emil Velikov --- src/glx/apple/apple_glx_pbuffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/glx/apple/apple_glx_pbuffer.c') diff --git a/src/glx/apple/apple_glx_pbuffer.c b/src/glx/apple/apple_glx_pbuffer.c index 142f4cce994..8c94d2010f4 100644 --- a/src/glx/apple/apple_glx_pbuffer.c +++ b/src/glx/apple/apple_glx_pbuffer.c @@ -40,12 +40,14 @@ #include "apple_glx_context.h" #include "apple_glx_drawable.h" +#include #include #include #include #include "apple_glx.h" #include "glxconfig.h" #include "apple_cgl.h" +#include "util/debug.h" /* mesa defines in glew.h, Apple in glext.h. * Due to namespace nightmares, just do it here. @@ -208,7 +210,7 @@ get_max_size(int *widthresult, int *heightresult) err = apple_cgl.choose_pixel_format(attr, &pfobj, &vsref); if (kCGLNoError != err) { - if (getenv("LIBGL_DIAGNOSTIC")) { + if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false)) { printf("choose_pixel_format error in %s: %s\n", __func__, apple_cgl.error_string(err)); } @@ -220,7 +222,7 @@ get_max_size(int *widthresult, int *heightresult) err = apple_cgl.create_context(pfobj, NULL, &newcontext); if (kCGLNoError != err) { - if (getenv("LIBGL_DIAGNOSTIC")) { + if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false)) { printf("create_context error in %s: %s\n", __func__, apple_cgl.error_string(err)); } -- cgit v1.2.3