gallium: Disable debug_get_option for release builds on Windows.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 9 May 2008 05:34:51 +0000 (14:34 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 9 May 2008 05:34:51 +0000 (14:34 +0900)
It always creates the C:\gallium.cfg , even if it does not exists, which
might be confusing.

src/gallium/auxiliary/util/p_debug.c

index 951dd5a2d4fbaee93ce473989d703c3bc08821f4..ce7fb589562fbe18cbf0e63856a281720bcc3b7a 100644 (file)
@@ -154,6 +154,7 @@ debug_get_option(const char *name, const char *dfault)
 {
    const char *result;
 #ifdef PIPE_SUBSYSTEM_WINDOWS_DISPLAY
+#ifdef DEBUG
    ULONG_PTR iFile = 0;
    const void *pMap = NULL;
    const char *sol, *eol, *sep;
@@ -183,6 +184,9 @@ debug_get_option(const char *name, const char *dfault)
       }
       EngUnmapFile(iFile);
    }
+#else
+   result = dfault;
+#endif
 #else
    
    result = getenv(name);