Implement DPRINTF using fmt

pull/3/head
Hleb Valoshka 2019-08-06 23:09:31 +03:00
parent c17a717626
commit f05679db8e
1 changed files with 4 additions and 3 deletions

View File

@ -13,6 +13,7 @@
#include <cstdio>
#include <cstdarg>
#include <config.h>
#include <fmt/printf.h>
static int debugVerbosity = 0;
@ -28,15 +29,15 @@ void DebugPrint(int level, const char *format, ...)
if (IsDebuggerPresent())
{
char buf[1024];
vsprintf(buf, format, args);
fmt::vsprintf(buf, format, args);
OutputDebugStringA(buf);
}
else
{
vfprintf(stdout, format, args);
fmt::vfprintf(stdout, format, args);
}
#else
vfprintf(stderr, format, args);
fmt::vfprintf(stderr, format, args);
#endif
}