mirror of https://github.com/AxioDL/logvisor.git
windows fixes
This commit is contained in:
parent
154b844130
commit
828db515ba
|
@ -1,7 +1,8 @@
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
#define _WIN32_LEAN_AND_MEAN 1
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define snprintf _snprintf
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
@ -104,8 +105,9 @@ struct ConsoleLogger : public ILogger
|
||||||
fprintf(stderr, "[");
|
fprintf(stderr, "[");
|
||||||
SetConsoleTextAttribute(Term, FOREGROUND_INTENSITY | FOREGROUND_GREEN);
|
SetConsoleTextAttribute(Term, FOREGROUND_INTENSITY | FOREGROUND_GREEN);
|
||||||
fprintf(stderr, "%5.4f ", tmd);
|
fprintf(stderr, "%5.4f ", tmd);
|
||||||
if (FrameIndex)
|
uint64_t fi = FrameIndex.load();
|
||||||
fprintf(stderr, "(%llu) ", FrameIndex);
|
if (fi)
|
||||||
|
fprintf(stderr, "(%llu) ", fi);
|
||||||
switch (severity)
|
switch (severity)
|
||||||
{
|
{
|
||||||
case Info:
|
case Info:
|
||||||
|
@ -304,7 +306,7 @@ struct FileLogger : public ILogger
|
||||||
fprintf(fp, " %5.4f", tmd);
|
fprintf(fp, " %5.4f", tmd);
|
||||||
uint_fast64_t fIdx = FrameIndex.load();
|
uint_fast64_t fIdx = FrameIndex.load();
|
||||||
if (fIdx)
|
if (fIdx)
|
||||||
fprintf(fp, " (%lu)", fIdx);
|
fprintf(fp, " (%llu)", fIdx);
|
||||||
fprintf(fp, "] ");
|
fprintf(fp, "] ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue