]> git.cworth.org Git - apitrace/blobdiff - formatter.hpp
Change filterText to searchText
[apitrace] / formatter.hpp
index 9f17c006afc05b7ecd309c4adc17013070873c34..181e2d1539d5c14bc14e070db1325a31d2593ad4 100644 (file)
@@ -105,7 +105,7 @@ inline std::ostream& operator<<(std::ostream& os, const Attribute *attr) {
 }
 
 
-#ifdef WIN32
+#ifdef _WIN32
 
 #include <windows.h>
 
@@ -155,12 +155,16 @@ public:
 #endif
 
 
-inline Formatter *defaultFormatter(void) {
-#ifdef WIN32
-    return new WindowsFormatter;
+inline Formatter *defaultFormatter(bool color = true) {
+    if (color) {
+#ifdef _WIN32
+        return new WindowsFormatter;
 #else
-    return new AnsiFormatter;
+        return new AnsiFormatter;
 #endif
+    } else {
+        return new Formatter;
+    }
 }