mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Don't allocate the windows console default
This commit is contained in:
parent
020d8c8913
commit
c20b9801d4
|
@ -1890,7 +1890,7 @@ if(CLIENT)
|
|||
|
||||
# Target
|
||||
set(TARGET_CLIENT ${CLIENT_EXECUTABLE})
|
||||
add_executable(${TARGET_CLIENT}
|
||||
add_executable(${TARGET_CLIENT} WIN32
|
||||
${CLIENT_SRC}
|
||||
${CLIENT_ICON}
|
||||
${CLIENT_MANIFEST}
|
||||
|
|
|
@ -4270,10 +4270,12 @@ int main(int argc, const char **argv) // ignore_convention
|
|||
if(str_comp("-s", argv[i]) == 0 || str_comp("--silent", argv[i]) == 0) // ignore_convention
|
||||
{
|
||||
Silent = true;
|
||||
}
|
||||
else if(str_comp("-c", argv[i]) == 0 || str_comp("--console", argv[i]) == 0) // ignore_convention
|
||||
{
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
FreeConsole();
|
||||
AllocConsole();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4367,6 +4369,11 @@ int main(int argc, const char **argv) // ignore_convention
|
|||
pConsole->ExecuteFile(CONFIG_FILE);
|
||||
}
|
||||
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
if(g_Config.m_ClShowConsole)
|
||||
AllocConsole();
|
||||
#endif
|
||||
|
||||
// execute autoexec file
|
||||
File = pStorage->OpenFile(AUTOEXEC_CLIENT_FILE, IOFLAG_READ, IStorage::TYPE_ALL);
|
||||
if(File)
|
||||
|
@ -4408,11 +4415,6 @@ int main(int argc, const char **argv) // ignore_convention
|
|||
|
||||
pClient->Engine()->InitLogfile();
|
||||
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
if(!g_Config.m_ClShowConsole)
|
||||
FreeConsole();
|
||||
#endif
|
||||
|
||||
// run the client
|
||||
dbg_msg("client", "starting...");
|
||||
pClient->Run();
|
||||
|
|
Loading…
Reference in a new issue