diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-27 15:48:59 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-27 15:48:59 -0500 |
commit | c38e418286c5cc2e8af7f68de9483d9cdcf95dce (patch) | |
tree | 461a7ce91748ac506fa31e7c918ab5ba6f6d8b14 /base.h | |
parent | 0fcc0682080da33edc81fa98c450a904165d5b5a (diff) |
only render visible lines
Diffstat (limited to 'base.h')
-rw-r--r-- | base.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |