[Console] Correctly hide the console

This commit is contained in:
momo5502 2017-02-18 21:14:42 +01:00
parent 733054431b
commit a7f0b6b4d2
2 changed files with 2 additions and 2 deletions

View File

@ -484,7 +484,7 @@ namespace Components
void Console::FreeNativeConsole() void Console::FreeNativeConsole()
{ {
if (Flags::HasFlag("console") || ZoneBuilder::IsEnabled()) if (!Flags::HasFlag("stdout") && (!Dedicated::IsEnabled() || Flags::HasFlag("console")))
{ {
FreeConsole(); FreeConsole();
} }

View File

@ -24,7 +24,7 @@ namespace Components
Singleton::FirstInstance = (CreateMutexA(nullptr, FALSE, "iw4x_mutex") && GetLastError() != ERROR_ALREADY_EXISTS); Singleton::FirstInstance = (CreateMutexA(nullptr, FALSE, "iw4x_mutex") && GetLastError() != ERROR_ALREADY_EXISTS);
if (!Singleton::FirstInstance && !ConnectProtocol::Used() && MessageBoxA(nullptr, "Do you want to start another instance?", "Game already running", MB_ICONEXCLAMATION | MB_YESNO) == IDNO) if (!Singleton::FirstInstance && !ConnectProtocol::Used() && MessageBoxA(nullptr, "Do you want to start another instance?\nNot all features will be available!", "Game already running", MB_ICONEXCLAMATION | MB_YESNO) == IDNO)
{ {
ExitProcess(0); ExitProcess(0);
} }