]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Changed Win32 console logic to only allocate a console when a dedicated server.
authorres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 7 Dec 2007 09:18:34 +0000 (09:18 +0000)
committerres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 7 Dec 2007 09:18:34 +0000 (09:18 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7776 d7cf8633-e32d-0410-b094-e92efae38249

sys_win.c

index 0da7f23685caca1e9c91fc8b8ea5a1a21187af91..f86b03e054f1315cdbcd8611a1c0580d9ed41f0a 100644 (file)
--- 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");