]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_win.c
Make sure the server<->client interpreters run.
[xonotic/darkplaces.git] / sys_win.c
index 2ed54abcac1775b6c784e4780cb62c7918d6a511..0259a02a39302d3d91103336bc4afe53eb1bf9b2 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -19,16 +19,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 // sys_win.c -- Win32 system interface code
 
-#include "quakedef.h"
 #include <windows.h>
 #include <mmsystem.h>
+#include <direct.h>
 #ifdef SUPPORTDIRECTX
 #include <dsound.h>
 #endif
-#include "errno.h"
+
+#include "qtypes.h"
+
+#include "quakedef.h"
+#include <errno.h>
 #include "resource.h"
 #include "conproc.h"
-#include "direct.h"
 
 HANDLE                         hinput, houtput;
 
@@ -237,11 +240,11 @@ void Sys_InitConsole (void)
        houtput = GetStdHandle (STD_OUTPUT_HANDLE);
        hinput = GetStdHandle (STD_INPUT_HANDLE);
 
-       // LordHavoc: can't check cls.state because it hasn't been initialized yet
+       // LadyHavoc: 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)) // LordHavoc: on Windows XP this is never 0 or invalid, but hinput is invalid
+               //if ((houtput == 0) || (houtput == INVALID_HANDLE_VALUE)) // LadyHavoc: on Windows XP this is never 0 or invalid, but hinput is invalid
                {
                        if (!AllocConsole ())
                                Sys_Error ("Couldn't create dedicated server console (error code %x)", (unsigned int)GetLastError());
@@ -355,6 +358,8 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
                }
        }
 
+       Sys_ProvideSelfFD();
+
        Host_Main();
 
        /* return success of application */