From: res Date: Fri, 7 Dec 2007 09:18:34 +0000 (+0000) Subject: Changed Win32 console logic to only allocate a console when a dedicated server. X-Git-Tag: xonotic-v0.1.0preview~2714 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a78de7811569ca3b15000f0b9376d15d7be9948d;p=xonotic%2Fdarkplaces.git Changed Win32 console logic to only allocate a console when a dedicated server. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7776 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sys_win.c b/sys_win.c index 0da7f236..f86b03e0 100644 --- a/sys_win.c +++ b/sys_win.c @@ -309,17 +309,18 @@ void Sys_InitConsole (void) Sys_Error ("Couldn't create event"); houtput = GetStdHandle (STD_OUTPUT_HANDLE); - if ((houtput == 0) || (houtput == INVALID_HANDLE_VALUE)) - { - AllocConsole (); - houtput = GetStdHandle (STD_OUTPUT_HANDLE); - } hinput = GetStdHandle (STD_INPUT_HANDLE); // LordHavoc: can't check cls.state because it hasn't been initialized yet // if (cls.state == ca_dedicated) if (COM_CheckParm("-dedicated")) { + if ((houtput == 0) || (houtput == INVALID_HANDLE_VALUE)) + { + AllocConsole (); + houtput = GetStdHandle (STD_OUTPUT_HANDLE); + hinput = GetStdHandle (STD_INPUT_HANDLE); + } if ((houtput == 0) || (houtput == INVALID_HANDLE_VALUE)) Sys_Error ("Couldn't create dedicated server console");