]> git.cworth.org Git - apitrace/blobdiff - os_win32.cpp
Handle vertex attriv locations correctly.
[apitrace] / os_win32.cpp
index 57a7fbca452bf3090766870098b3861629fefcb6..f220ae5ec46dbbcd7368ca0204a36a669d26c835 100644 (file)
@@ -99,18 +99,25 @@ 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)
 {
     static LARGE_INTEGER frequency;
     LARGE_INTEGER counter;
-    if(!frequency.QuadPart)
+    if (!frequency.QuadPart)
         QueryPerformanceFrequency(&frequency);
     QueryPerformanceCounter(&counter);
     return counter.QuadPart*1000000LL/frequency.QuadPart;