]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_win.c
added COMMANDLINEOPTION comments for every commandline option, these will be listed...
[xonotic/darkplaces.git] / sys_win.c
index a2be13cc89920c0e9a884ef6545d1d0972e30622..d5298cc2c6638f71da1d1497c43299acf4686e4f 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -356,31 +356,31 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
                while (*lpCmdLine && *lpCmdLine <= ' ')
                        lpCmdLine++;
 
                while (*lpCmdLine && *lpCmdLine <= ' ')
                        lpCmdLine++;
 
-               if (*lpCmdLine)
+               if (!*lpCmdLine)
+                       break;
+
+               if (*lpCmdLine == '\"')
                {
                {
-                       if (*lpCmdLine == '\"')
-                       {
-                               // quoted string
+                       // quoted string
+                       lpCmdLine++;
+                       argv[com_argc] = lpCmdLine;
+                       com_argc++;
+                       while (*lpCmdLine && (*lpCmdLine != '\"'))
                                lpCmdLine++;
                                lpCmdLine++;
-                               argv[com_argc] = lpCmdLine;
-                               com_argc++;
-                               while (*lpCmdLine && (*lpCmdLine != '\"'))
-                                       lpCmdLine++;
-                       }
-                       else
-                       {
-                               // unquoted word
-                               argv[com_argc] = lpCmdLine;
-                               com_argc++;
-                               while (*lpCmdLine && *lpCmdLine > ' )
-                                       lpCmdLine++;
-                       }
-
-                       if (*lpCmdLine)
-                       {
-                               *lpCmdLine = 0;
+               }
+               else
+               {
+                       // unquoted word
+                       argv[com_argc] = lpCmdLine;
+                       com_argc++;
+                       while (*lpCmdLine && *lpCmdLine > ' ')
                                lpCmdLine++;
                                lpCmdLine++;
-                       }
+               }
+
+               if (*lpCmdLine)
+               {
+                       *lpCmdLine = 0;
+                       lpCmdLine++;
                }
        }
 
                }
        }
 
@@ -404,18 +404,21 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
                houtput = GetStdHandle (STD_OUTPUT_HANDLE);
 
        // give QHOST a chance to hook into the console
                houtput = GetStdHandle (STD_OUTPUT_HANDLE);
 
        // give QHOST a chance to hook into the console
+// COMMANDLINEOPTION: -HFILE is used by QHOST to hook into the windows dedicated server console window
                if ((t = COM_CheckParm ("-HFILE")) > 0)
                {
                        if (t < com_argc)
                                hFile = (HANDLE)atoi (com_argv[t+1]);
                }
 
                if ((t = COM_CheckParm ("-HFILE")) > 0)
                {
                        if (t < com_argc)
                                hFile = (HANDLE)atoi (com_argv[t+1]);
                }
 
+// COMMANDLINEOPTION: -HPARENT is used by QHOST to hook into the windows dedicated server console window
                if ((t = COM_CheckParm ("-HPARENT")) > 0)
                {
                        if (t < com_argc)
                                heventParent = (HANDLE)atoi (com_argv[t+1]);
                }
 
                if ((t = COM_CheckParm ("-HPARENT")) > 0)
                {
                        if (t < com_argc)
                                heventParent = (HANDLE)atoi (com_argv[t+1]);
                }
 
+// COMMANDLINEOPTION: -HCHILD is used by QHOST to hook into the windows dedicated server console window
                if ((t = COM_CheckParm ("-HCHILD")) > 0)
                {
                        if (t < com_argc)
                if ((t = COM_CheckParm ("-HCHILD")) > 0)
                {
                        if (t < com_argc)