summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-04 08:56:20 +0200
committermadmaxoft <github@xoft.cz>2013-08-04 08:56:20 +0200
commit37850433d2614a9ad3b95064bd2900fc3b541bb6 (patch)
tree33b4f5729d0c51fe1882f71f36dd4f503b0bca82 /source
parentRemoved all example ini files from Install. (diff)
downloadcuberite-37850433d2614a9ad3b95064bd2900fc3b541bb6.tar
cuberite-37850433d2614a9ad3b95064bd2900fc3b541bb6.tar.gz
cuberite-37850433d2614a9ad3b95064bd2900fc3b541bb6.tar.bz2
cuberite-37850433d2614a9ad3b95064bd2900fc3b541bb6.tar.lz
cuberite-37850433d2614a9ad3b95064bd2900fc3b541bb6.tar.xz
cuberite-37850433d2614a9ad3b95064bd2900fc3b541bb6.tar.zst
cuberite-37850433d2614a9ad3b95064bd2900fc3b541bb6.zip
Diffstat (limited to 'source')
-rw-r--r--source/MCLogger.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/MCLogger.cpp b/source/MCLogger.cpp
index 94a2ea1c7..b0ec4efd5 100644
--- a/source/MCLogger.cpp
+++ b/source/MCLogger.cpp
@@ -10,6 +10,9 @@
cMCLogger * cMCLogger::s_MCLogger = NULL;
+#ifdef _WIN32
+ HANDLE g_Console = GetStdHandle(STD_OUTPUT_HANDLE);
+#endif
@@ -145,8 +148,7 @@ void cMCLogger::Error(const char* a_Format, va_list a_ArgList)
void cMCLogger::SetColor( unsigned char a_Color )
{
#ifdef _WIN32
- HANDLE hConsole = GetStdHandle( STD_OUTPUT_HANDLE );
- SetConsoleTextAttribute( hConsole, a_Color );
+ SetConsoleTextAttribute(g_Console, a_Color);
#else
(void)a_Color;
#endif