Mesa (mesa_7_5_branch): mesa: Output warnings to debugger on Windows.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Sun May 31 03:29:35 UTC 2009
Module: Mesa
Branch: mesa_7_5_branch
Commit: 5bb2074798a752557a1eaa8f2d2b8b45282f9f7e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5bb2074798a752557a1eaa8f2d2b8b45282f9f7e
Author: José Fonseca <jfonseca at vmware.com>
Date: Sat May 30 12:42:55 2009 -0700
mesa: Output warnings to debugger on Windows.
Stderr of Windows applications without console is not usually
visible.
---
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 615f7c9..3fb6708 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
}
}
More information about the mesa-commit
mailing list