mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +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
|
# Target
|
||||||
set(TARGET_CLIENT ${CLIENT_EXECUTABLE})
|
set(TARGET_CLIENT ${CLIENT_EXECUTABLE})
|
||||||
add_executable(${TARGET_CLIENT}
|
add_executable(${TARGET_CLIENT} WIN32
|
||||||
${CLIENT_SRC}
|
${CLIENT_SRC}
|
||||||
${CLIENT_ICON}
|
${CLIENT_ICON}
|
||||||
${CLIENT_MANIFEST}
|
${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
|
if(str_comp("-s", argv[i]) == 0 || str_comp("--silent", argv[i]) == 0) // ignore_convention
|
||||||
{
|
{
|
||||||
Silent = true;
|
Silent = true;
|
||||||
|
}
|
||||||
|
else if(str_comp("-c", argv[i]) == 0 || str_comp("--console", argv[i]) == 0) // ignore_convention
|
||||||
|
{
|
||||||
#if defined(CONF_FAMILY_WINDOWS)
|
#if defined(CONF_FAMILY_WINDOWS)
|
||||||
FreeConsole();
|
AllocConsole();
|
||||||
#endif
|
#endif
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4367,6 +4369,11 @@ int main(int argc, const char **argv) // ignore_convention
|
||||||
pConsole->ExecuteFile(CONFIG_FILE);
|
pConsole->ExecuteFile(CONFIG_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONF_FAMILY_WINDOWS)
|
||||||
|
if(g_Config.m_ClShowConsole)
|
||||||
|
AllocConsole();
|
||||||
|
#endif
|
||||||
|
|
||||||
// execute autoexec file
|
// execute autoexec file
|
||||||
File = pStorage->OpenFile(AUTOEXEC_CLIENT_FILE, IOFLAG_READ, IStorage::TYPE_ALL);
|
File = pStorage->OpenFile(AUTOEXEC_CLIENT_FILE, IOFLAG_READ, IStorage::TYPE_ALL);
|
||||||
if(File)
|
if(File)
|
||||||
|
@ -4408,11 +4415,6 @@ int main(int argc, const char **argv) // ignore_convention
|
||||||
|
|
||||||
pClient->Engine()->InitLogfile();
|
pClient->Engine()->InitLogfile();
|
||||||
|
|
||||||
#if defined(CONF_FAMILY_WINDOWS)
|
|
||||||
if(!g_Config.m_ClShowConsole)
|
|
||||||
FreeConsole();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// run the client
|
// run the client
|
||||||
dbg_msg("client", "starting...");
|
dbg_msg("client", "starting...");
|
||||||
pClient->Run();
|
pClient->Run();
|
||||||
|
|
Loading…
Reference in a new issue