summaryrefslogtreecommitdiff
path: root/src/glx/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/dri_glx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index d88ce91364..a8d9306b99 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -81,11 +81,15 @@ static void InfoMessageF(const char *f, ...)
}
}
+/**
+ * Print error to stderr, unless LIBGL_DEBUG=="quiet".
+ */
static void ErrorMessageF(const char *f, ...)
{
va_list args;
+ const char *env;
- if (getenv("LIBGL_DEBUG")) {
+ if ((env = getenv("LIBGL_DEBUG")) && !strstr(env, "quiet")) {
fprintf(stderr, "libGL error: ");
va_start(args, f);
vfprintf(stderr, f, args);