summaryrefslogtreecommitdiffstats
path: root/src/MCLogger.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-05-07 12:54:58 +0200
committerHowaner <franzi.moos@googlemail.com>2014-05-07 12:54:58 +0200
commitf5fe3682201e2f1356e3a5c408eb8296b542e072 (patch)
tree208ec7a760b9e909fbb43e1a12ee43d866cb9df7 /src/MCLogger.cpp
parentRemove old import (diff)
parentFixed wires powering wires diagonally below them (diff)
downloadcuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.gz
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.bz2
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.lz
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.xz
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.zst
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.zip
Diffstat (limited to '')
-rw-r--r--src/MCLogger.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/MCLogger.cpp b/src/MCLogger.cpp
index 80fa7b173..583438d65 100644
--- a/src/MCLogger.cpp
+++ b/src/MCLogger.cpp
@@ -9,7 +9,6 @@
cMCLogger * cMCLogger::s_MCLogger = NULL;
-bool g_ShouldColorOutput = false;
#ifdef _WIN32
#include <io.h> // Needed for _isatty(), not available on Linux
@@ -33,7 +32,8 @@ cMCLogger * cMCLogger::GetInstance(void)
-cMCLogger::cMCLogger(void)
+cMCLogger::cMCLogger(void):
+ m_ShouldColorOutput(false)
{
AString FileName;
Printf(FileName, "LOG_%d.txt", (int)time(NULL));
@@ -76,15 +76,15 @@ void cMCLogger::InitLog(const AString & a_FileName)
#ifdef _WIN32
// See whether we are writing to a console the default console attrib:
- g_ShouldColorOutput = (_isatty(_fileno(stdin)) != 0);
- if (g_ShouldColorOutput)
+ m_ShouldColorOutput = (_isatty(_fileno(stdin)) != 0);
+ if (m_ShouldColorOutput)
{
CONSOLE_SCREEN_BUFFER_INFO sbi;
GetConsoleScreenBufferInfo(g_Console, &sbi);
g_DefaultConsoleAttrib = sbi.wAttributes;
}
#elif defined (__linux) && !defined(ANDROID_NDK)
- g_ShouldColorOutput = isatty(fileno(stdout));
+ m_ShouldColorOutput = isatty(fileno(stdout));
// TODO: Check if the terminal supports colors, somehow?
#endif
}
@@ -178,7 +178,7 @@ void cMCLogger::Error(const char * a_Format, va_list a_ArgList)
void cMCLogger::SetColor(eColorScheme a_Scheme)
{
- if (!g_ShouldColorOutput)
+ if (!m_ShouldColorOutput)
{
return;
}
@@ -211,7 +211,7 @@ void cMCLogger::SetColor(eColorScheme a_Scheme)
void cMCLogger::ResetColor(void)
{
- if (!g_ShouldColorOutput)
+ if (!m_ShouldColorOutput)
{
return;
}