mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
util: Also output messages to stderr on windows.
When there is a console attached, and no debugger attached.
This commit is contained in:
parent
a5c2570dc5
commit
5b41e30f26
1 changed files with 6 additions and 0 deletions
|
|
@ -50,6 +50,7 @@
|
|||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#else
|
||||
|
||||
|
|
@ -106,6 +107,11 @@ void _debug_vprintf(const char *format, va_list ap)
|
|||
OutputDebugStringA(buf);
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
if(GetConsoleWindow() && !IsDebuggerPresent()) {
|
||||
vfprintf(stderr, format, ap);
|
||||
}
|
||||
|
||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE)
|
||||
wchar_t *wide_format;
|
||||
long wide_str_len;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue