]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_win.c
changed sky rendering to occur after depthmask polygons, instead of before
[xonotic/darkplaces.git] / sys_win.c
index f12930d04b9d6624a99cc944c53cc0b0e4a6e499..d571dd2a4ba9173659d2f818ec8728140c561326 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -194,6 +194,10 @@ double Sys_DoubleTime (void)
                if (newtime - oldtime < -0.01)
                        Con_Printf("Sys_DoubleTime: time stepped backwards (went from %f to %f, difference %f)\n", oldtime, newtime, newtime - oldtime);
        }
+       else if (newtime > oldtime + 1800)
+       {
+               Con_Printf("Sys_DoubleTime: time stepped forward (went from %f to %f, difference %f)\n", oldtime, newtime, newtime - oldtime);
+       }
        else
                curtime += newtime - oldtime;
        oldtime = newtime;
@@ -265,7 +269,7 @@ char *Sys_ConsoleInput (void)
                                                break;
 
                                        default:
-                                               if (ch >= ' ')
+                                               if (ch >= (int) (unsigned char) ' ')
                                                {
                                                        WriteFile(houtput, &ch, 1, &dummy, NULL);
                                                        text[len] = ch;
@@ -298,11 +302,11 @@ char *Sys_GetClipboardData (void)
 
                if ((hClipboardData = GetClipboardData (CF_TEXT)) != 0)
                {
-                       if ((cliptext = GlobalLock (hClipboardData)) != 0)
+                       if ((cliptext = (char *)GlobalLock (hClipboardData)) != 0)
                        {
                                size_t allocsize;
                                allocsize = GlobalSize (hClipboardData) + 1;
-                               data = Z_Malloc (allocsize);
+                               data = (char *)Z_Malloc (allocsize);
                                strlcpy (data, cliptext, allocsize);
                                GlobalUnlock (hClipboardData);
                        }
@@ -419,7 +423,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
        // FIXME: this tokenizer is rather redundent, call a more general one
        while (*lpCmdLine && (com_argc < MAX_NUM_ARGVS))
        {
-               while (*lpCmdLine && *lpCmdLine <= ' ')
+               while (*lpCmdLine && ISWHITESPACE(*lpCmdLine))
                        lpCmdLine++;
 
                if (!*lpCmdLine)
@@ -439,7 +443,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
                        // unquoted word
                        argv[com_argc] = lpCmdLine;
                        com_argc++;
-                       while (*lpCmdLine && *lpCmdLine > ' ')
+                       while (*lpCmdLine && !ISWHITESPACE(*lpCmdLine))
                                lpCmdLine++;
                }
 
@@ -456,6 +460,8 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
        return true;
 }
 
+#if 0
+// unused, this file is only used when building windows client and vid_wgl provides WinMain() instead
 int main (int argc, const char* argv[])
 {
        MEMORYSTATUS lpBuffer;
@@ -475,3 +481,5 @@ int main (int argc, const char* argv[])
 
        return true;
 }
+#endif
+