summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-04-17 10:38:07 +0100
committerKeith Whitwell <[email protected]>2009-04-17 11:02:07 +0100
commit29a2f6fead25b8231c27ec47cadb9265736d8527 (patch)
tree3a8495aabd65a1ea161099420d53e962de57e1fc /src
parentdb93dcecc80a45e850b4594326fc453c950b54f5 (diff)
util: flush stdout before emitting debug_printf on stderr
A lot of the mesa demos emit commentary on stdout, try to keep it in sync with the corresponding output from debug_printf().
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 96a2222f9b6..ae47a274a69 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -109,6 +109,7 @@ void _debug_vprintf(const char *format, va_list ap)
}
if(GetConsoleWindow() && !IsDebuggerPresent()) {
+ fflush(stdout);
vfprintf(stderr, format, ap);
fflush(stderr);
}
@@ -145,6 +146,7 @@ void _debug_vprintf(const char *format, va_list ap)
/* TODO */
#else /* !PIPE_SUBSYSTEM_WINDOWS */
#ifdef DEBUG
+ fflush(stdout);
vfprintf(stderr, format, ap);
#endif
#endif