summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/main.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-11 10:32:31 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-11 10:32:31 +0000
commitea10fa390a8ca647ada27173ec5d375b8a597aa2 (patch)
tree634f8a6dea0dcca7b373fcd4e0ce1fc02dfaf0e6 /plugins/MirLua/src/main.cpp
parentba33f8bbdd9a2d8c6f45454e2174770f444ffa2f (diff)
MirLua: tuneup debug console
git-svn-id: http://svn.miranda-ng.org/main/trunk@14114 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/main.cpp')
-rw-r--r--plugins/MirLua/src/main.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp
index 36c64e2572..ae95013c1a 100644
--- a/plugins/MirLua/src/main.cpp
+++ b/plugins/MirLua/src/main.cpp
@@ -72,15 +72,16 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
-#ifdef _DEBUG
- if (AllocConsole())
+ if (db_get_b(NULL, MODULE, "ShowConsole", 0))
{
- freopen("CONOUT$", "wt", stdout);
- hConsole = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL);
- SetConsoleTitle(_T("MirLua Console"));
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);
+ if (AllocConsole())
+ {
+ freopen("CONOUT$", "wt", stdout);
+ hConsole = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL);
+ SetConsoleTitle(_T("MirLua Console"));
+ SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);
+ }
}
-#endif
mLua = new CMLua();