diff options
Diffstat (limited to 'plugins/MirLua/src/main.cpp')
-rw-r--r-- | plugins/MirLua/src/main.cpp | 15 |
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();
|