From c38e418286c5cc2e8af7f68de9483d9cdcf95dce Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Sun, 27 Dec 2020 15:48:59 -0500 Subject: only render visible lines --- base.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'base.h') 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 -- cgit v1.2.3