Instead of setting based on set/unset, allow users to use boolean values.
In the help string, use `ALLOW=true` instead of `ALLOW=1` as it's clearer IMO.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
attr[numattr++] = kCGLPFARendererID;
attr[numattr++] = kCGLRendererGenericFloatID;
}
- else if (getenv("LIBGL_ALLOW_SOFTWARE") != NULL) {
+ else if (env_var_as_boolean("LIBGL_ALLOW_SOFTWARE", false)) {
apple_glx_diagnostic
("Software rendering is not being excluded. Not using kCGLPFAAccelerated.\n");
}
if (!*pfobj) {
snprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__),
- "No matching pixelformats found, perhaps try using LIBGL_ALLOW_SOFTWARE\n");
+ "No matching pixelformats found, perhaps try setting LIBGL_ALLOW_SOFTWARE=true\n");
fprintf(stderr, "%s", __crashreporter_info_buff__);
abort();
}