]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_sdl.c
changed Sys_Sleep from (void) to (int milliseconds), now wastes a lot less cpu time...
[xonotic/darkplaces.git] / sys_sdl.c
index bb2364946286aba5870f15f0f0d63e16409f2d87..9c7571671333698f9a4ea910f1e529bb9b809e41 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
@@ -195,13 +195,11 @@ char *Sys_ConsoleInput(void)
        return NULL;
 }
 
        return NULL;
 }
 
-void Sys_Sleep(void)
+void Sys_Sleep(int milliseconds)
 {
 {
-#ifdef WIN32
-       Sleep (1);
-#else
-       usleep(1);
-#endif
+       if (milliseconds < 1)
+               milliseconds = 1;
+       SDL_Delay(milliseconds);
 }
 
 int SDL_main (int argc, char *argv[])
 }
 
 int SDL_main (int argc, char *argv[])