mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Fix -c argument being ignored if not in first position
This commit is contained in:
parent
1b1cf5d312
commit
19e113cde3
|
@ -2431,18 +2431,25 @@ void CClient::HandleTeeworldsConnectLink(const char *pConLink)
|
||||||
int main(int argc, const char **argv) // ignore_convention
|
int main(int argc, const char **argv) // ignore_convention
|
||||||
{
|
{
|
||||||
#if defined(CONF_FAMILY_WINDOWS)
|
#if defined(CONF_FAMILY_WINDOWS)
|
||||||
|
bool UseDefaultConsoleSettings = true;
|
||||||
for(int i = 1; i < argc; i++) // ignore_convention
|
for(int i = 1; i < argc; i++) // ignore_convention
|
||||||
{
|
{
|
||||||
#ifdef CONF_RELEASE
|
#ifdef CONF_RELEASE
|
||||||
if(!(str_comp("-c", argv[i]) == 0 || str_comp("--console", argv[i]) == 0)) // ignore_convention
|
if(str_comp("-c", argv[i]) == 0 || str_comp("--console", argv[i]) == 0) // ignore_convention
|
||||||
#else
|
#else
|
||||||
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
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
FreeConsole();
|
UseDefaultConsoleSettings = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef CONF_RELEASE
|
||||||
|
if(!UseDefaultConsoleSettings)
|
||||||
|
#else
|
||||||
|
if(UseDefaultConsoleSettings)
|
||||||
|
#endif
|
||||||
|
FreeConsole();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool UseDefaultConfig = false;
|
bool UseDefaultConfig = false;
|
||||||
|
|
Loading…
Reference in a new issue