glx: turn LIBGL_PROFILE_CORE into a boolean
authorEric Engestrom <eric.engestrom@imgtec.com>
Fri, 8 Sep 2017 10:56:38 +0000 (11:56 +0100)
committerEric Engestrom <eric.engestrom@imgtec.com>
Tue, 12 Sep 2017 12:53:12 +0000 (13:53 +0100)
Instead of setting based on set/unset, allow users to use boolean values.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/glx/apple/apple_visual.c

index d8fd7b0cb3d4524b9b01400bb8ffee344c4b1755..d482bfc4e712d665feae228701e873930a4cf5d4 100644 (file)
@@ -82,7 +82,7 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
    int numattr = 0;
    GLint vsref = 0;
    CGLError error = 0;
-   bool use_core_profile = getenv("LIBGL_PROFILE_CORE");
+   bool use_core_profile = env_var_as_boolean("LIBGL_PROFILE_CORE", false);
 
    if (offscreen) {
       apple_glx_diagnostic