summaryrefslogtreecommitdiffstats
path: root/src/MCLogger.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-01 00:02:26 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-01 00:02:26 +0100
commit6b18add09b5e9d6d6c2a61e90bdd7011f56f4c82 (patch)
tree3a363b680a8c4a897fd98f7d5856d0c0c5b990d5 /src/MCLogger.cpp
parentProperly initialised variables (diff)
downloadcuberite-6b18add09b5e9d6d6c2a61e90bdd7011f56f4c82.tar
cuberite-6b18add09b5e9d6d6c2a61e90bdd7011f56f4c82.tar.gz
cuberite-6b18add09b5e9d6d6c2a61e90bdd7011f56f4c82.tar.bz2
cuberite-6b18add09b5e9d6d6c2a61e90bdd7011f56f4c82.tar.lz
cuberite-6b18add09b5e9d6d6c2a61e90bdd7011f56f4c82.tar.xz
cuberite-6b18add09b5e9d6d6c2a61e90bdd7011f56f4c82.tar.zst
cuberite-6b18add09b5e9d6d6c2a61e90bdd7011f56f4c82.zip
Diffstat (limited to '')
-rw-r--r--src/MCLogger.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/MCLogger.cpp b/src/MCLogger.cpp
index b7b826374..0828b7fe4 100644
--- a/src/MCLogger.cpp
+++ b/src/MCLogger.cpp
@@ -147,7 +147,11 @@ void cMCLogger::Log(const char * a_Format, va_list a_ArgList, bool a_ShouldRepla
SetConsoleCursorPosition(Output, Position);
SetColor(csRegular);
- m_Log->Log(a_Format, a_ArgList, a_ShouldReplaceLine);
+ if (!m_Log->LogReplaceLine(a_Format, a_ArgList))
+ {
+ m_BeginLineUpdate = false;
+ puts("");
+ }
ResetColor();
Position = { 0, csbi.dwCursorPosition.Y }; // Set cursor to original position
@@ -155,14 +159,18 @@ void cMCLogger::Log(const char * a_Format, va_list a_ArgList, bool a_ShouldRepla
#else // _WIN32
fputs("\033[1A", stdout); // Move cursor up one line
SetColor(csRegular);
- m_Log->Log(a_Format, a_ArgList, a_ShouldReplaceLine);
+ if (!m_Log->LogReplaceLine(a_Format, a_ArgList))
+ {
+ m_BeginLineUpdate = false;
+ puts("");
+ }
ResetColor();
#endif
}
else
{
SetColor(csRegular);
- m_Log->Log(a_Format, a_ArgList, a_ShouldReplaceLine);
+ m_Log->Log(a_Format, a_ArgList);
ResetColor();
puts("");
}