]> git.cworth.org Git - apitrace/blobdiff - os_win32.cpp
Trace the whole OpenGL framework on Mac OS X.
[apitrace] / os_win32.cpp
index 6cddc552681db55863e1eaf01f1f1baac070c2ed..f220ae5ec46dbbcd7368ca0204a36a669d26c835 100644 (file)
@@ -99,11 +99,18 @@ DebugMessage(const char *format, ...)
     va_end(ap);
 
     OutputDebugStringA(buf);
+
+    /*
+     * Also write the message to stderr, when a debugger is not present (to
+     * avoid duplicate messages in command line debuggers).
+     */
+#if _WIN32_WINNT > 0x0400
     if (!IsDebuggerPresent()) {
         fflush(stdout);
         fputs(buf, stderr);
         fflush(stderr);
     }
+#endif
 }
 
 long long GetTime(void)