From 29a2f6fead25b8231c27ec47cadb9265736d8527 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 17 Apr 2009 10:38:07 +0100 Subject: [PATCH] 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(). --- src/gallium/auxiliary/util/u_debug.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.30.2