Implement DPRINTF using fmt
parent
c17a717626
commit
f05679db8e
|
@ -13,6 +13,7 @@
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include <fmt/printf.h>
|
||||||
|
|
||||||
static int debugVerbosity = 0;
|
static int debugVerbosity = 0;
|
||||||
|
|
||||||
|
@ -28,15 +29,15 @@ void DebugPrint(int level, const char *format, ...)
|
||||||
if (IsDebuggerPresent())
|
if (IsDebuggerPresent())
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
vsprintf(buf, format, args);
|
fmt::vsprintf(buf, format, args);
|
||||||
OutputDebugStringA(buf);
|
OutputDebugStringA(buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vfprintf(stdout, format, args);
|
fmt::vfprintf(stdout, format, args);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
vfprintf(stderr, format, args);
|
fmt::vfprintf(stderr, format, args);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue