summaryrefslogtreecommitdiff
path: root/base.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-27 15:48:59 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-27 15:48:59 -0500
commitc38e418286c5cc2e8af7f68de9483d9cdcf95dce (patch)
tree461a7ce91748ac506fa31e7c918ab5ba6f6d8b14 /base.h
parent0fcc0682080da33edc81fa98c450a904165d5b5a (diff)
only render visible lines
Diffstat (limited to 'base.h')
-rw-r--r--base.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/base.h b/base.h
index c9306a3..9b0c805 100644
--- a/base.h
+++ b/base.h
@@ -77,19 +77,20 @@ typedef unsigned long long ullong;
#if DEBUG
#if __unix__
-#define debug_println(...) printf(__VA_ARGS__), printf("\n")
+#define debug_print(...) printf(__VA_ARGS__)
#else // __unix__
-static void debug_println(char const *fmt, ...) {
+static void debug_print(char const *fmt, ...) {
char buf[256];
va_list args;
va_start(args, fmt);
vsprintf_s(buf, sizeof buf, fmt, args);
va_end(args);
OutputDebugStringA(buf);
- OutputDebugStringA("\n");
}
#endif // __unix__
+#define debug_println(...) debug_print(__VA_ARGS__), debug_print("\n")
#else // DEBUG
+#define debug_print(...)
#define debug_println(...)
#endif