diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-05-30 12:42:55 -0700 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-05-30 20:29:02 -0700 |
commit | 5bb2074798a752557a1eaa8f2d2b8b45282f9f7e (patch) | |
tree | 36a7e5e86acda069c318d732bf6906af899afb2f | |
parent | 8aef306c342a973f31b384a71d7a22ade9153a99 (diff) |
mesa: Output warnings to debugger on Windows.
Stderr of Windows applications without console is not usually
visible.
-rw-r--r-- | src/mesa/main/imports.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 615f7c9a6d..3fb67083a2 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -1008,6 +1008,16 @@ output_if_debug(const char *prefixString, const char *outputString, fprintf(stderr, "%s: %s", prefixString, outputString); if (newline) fprintf(stderr, "\n"); + +#if defined(_WIN32) && !defined(_WIN32_WCE) + /* stderr from windows applications without console is not usually + * visible, so communicate with the debugger instead */ + { + char buf[4096]; + _mesa_snprintf(buf, sizeof(buf), "%s: %s%s", prefixString, outputString, newline ? "\n" : ""); + OutputDebugStringA(buf); + } +#endif } } |