]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_linux.c
DP should read the config files correcly again now.
[xonotic/darkplaces.git] / sys_linux.c
index 2cda90728f61eadae4da357b02def3587523f343..9e8b155c25317973c075561bd9a98235a8661b73 100644 (file)
@@ -43,7 +43,7 @@ void Sys_Error (const char *error, ...)
 #endif
 
        va_start (argptr,error);
-       vsprintf (string,error,argptr);
+       vsnprintf (string, sizeof (string), error, argptr);
        va_end (argptr);
        fprintf(stderr, "Error: %s\n", string);
 
@@ -51,7 +51,7 @@ void Sys_Error (const char *error, ...)
        exit (1);
 }
 
-void Sys_Print(const char *text)
+void Sys_PrintToTerminal(const char *text)
 {
        printf("%s", text);
 }
@@ -139,7 +139,7 @@ char *Sys_ConsoleInput(void)
        if (cls.state == ca_dedicated)
        {
                static char text[256];
-               int len;
+               int len = 0;
 #ifdef WIN32
                int c;
 
@@ -194,12 +194,14 @@ char *Sys_ConsoleInput(void)
        return NULL;
 }
 
-void Sys_Sleep(void)
+void Sys_Sleep(int milliseconds)
 {
+       if (milliseconds < 1)
+               milliseconds = 1;
 #ifdef WIN32
-       Sleep (1);
+       Sleep(milliseconds);
 #else
-       usleep(1);
+       usleep(milliseconds * 1000);
 #endif
 }