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().
This commit is contained in:
Keith Whitwell 2009-04-17 10:38:07 +01:00
parent db93dcecc8
commit 29a2f6fead

View file

@ -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