diff options
author | marha <marha@users.sourceforge.net> | 2012-05-14 16:52:51 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-05-14 16:52:51 +0200 |
commit | 1a71b50696cc230cd055905a5f9fdbd3fa7c89af (patch) | |
tree | 23d0afa2e1458a54c656116205e485900e8edd9d /mesalib/src/mesa/main/errors.c | |
parent | 13a63d4f69c0692539448cb3d8e4a0e1ffdf2183 (diff) | |
download | vcxsrv-1a71b50696cc230cd055905a5f9fdbd3fa7c89af.tar.gz vcxsrv-1a71b50696cc230cd055905a5f9fdbd3fa7c89af.tar.bz2 vcxsrv-1a71b50696cc230cd055905a5f9fdbd3fa7c89af.zip |
fontconfig libX11 mesa xkeyboard-config pixman git update 14 May 2012
Diffstat (limited to 'mesalib/src/mesa/main/errors.c')
-rw-r--r-- | mesalib/src/mesa/main/errors.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/mesalib/src/mesa/main/errors.c b/mesalib/src/mesa/main/errors.c index 4a187b7b0..69dbb65cf 100644 --- a/mesalib/src/mesa/main/errors.c +++ b/mesalib/src/mesa/main/errors.c @@ -802,21 +802,20 @@ output_if_debug(const char *prefixString, const char *outputString, { static int debug = -1; - /* Check the MESA_DEBUG environment variable if it hasn't - * been checked yet. We only have to check it once... + /* Init the local 'debug' var once. + * Note: the _mesa_init_debug() function should have been called + * by now so MESA_DEBUG_FLAGS will be initialized. */ if (debug == -1) { - char *env = _mesa_getenv("MESA_DEBUG"); - - /* In a debug build, we print warning messages *unless* - * MESA_DEBUG is 0. In a non-debug build, we don't - * print warning messages *unless* MESA_DEBUG is - * set *to any value*. - */ #ifdef DEBUG - debug = (env != NULL && atoi(env) == 0) ? 0 : 1; + /* in debug builds, print messages unless MESA_DEBUG="silent" */ + if (MESA_DEBUG_FLAGS & DEBUG_SILENT) + debug = 0; + else + debug = 1; #else - debug = (env != NULL) ? 1 : 0; + /* in release builds, be silent unless MESA_DEBUG is set */ + debug = _mesa_getenv("MESA_DEBUG") != NULL; #endif } |