]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_linux.c
Remove alsa 0.6 (for some random date of cvs alsa) support, never officially released...
[xonotic/darkplaces.git] / sys_linux.c
index c24d4cf05f46a2c0a9a680a4133540c2f311d2c4..da6ae1d7f5748b2d8de8d78e86f11ec50b5e45a0 100644 (file)
@@ -17,6 +17,7 @@
 #include <string.h>
 #include <ctype.h>
 #include <errno.h>
+#include <time.h>
 
 #include "quakedef.h"
 
@@ -396,7 +397,6 @@ int main (int c, char **v)
 {
 
        double          time, oldtime, newtime;
-       quakeparms_t parms;
        extern int vcrFile;
        extern int recording;
        int j;
@@ -406,31 +406,31 @@ int main (int c, char **v)
 //     signal(SIGFPE, floating_point_exception_handler);
        signal(SIGFPE, SIG_IGN);
 
-       memset(&parms, 0, sizeof(parms));
+       memset(&host_parms, 0, sizeof(host_parms));
 
        COM_InitArgv(c, v);
-       parms.argc = com_argc;
-       parms.argv = com_argv;
+       host_parms.argc = com_argc;
+       host_parms.argv = com_argv;
 
-       parms.memsize = 24*1024*1024;
+       host_parms.memsize = DEFAULTMEM * 1024*1024;
 
        j = COM_CheckParm("-mem");
        if (j)
-               parms.memsize = (int) (atof(com_argv[j+1]) * 1024 * 1024);
-       parms.membase = malloc (parms.memsize);
-       if (!parms.membase)
+               host_parms.memsize = (int) (atof(com_argv[j+1]) * 1024 * 1024);
+       host_parms.membase = qmalloc(host_parms.memsize);
+       if (!host_parms.membase)
        {
                printf("Unable to allocate heap memory\n");
                return 1;
        }
 
-       parms.basedir = basedir;
+       host_parms.basedir = basedir;
 // caching is disabled by default, use -cachedir to enable
-//     parms.cachedir = cachedir;
+//     host_parms.cachedir = cachedir;
 
        fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
 
-       Host_Init(&parms);
+       Host_Init();
 
        Sys_Init();
 
@@ -439,7 +439,7 @@ int main (int c, char **v)
        else
        {
                fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
-               printf ("Linux DarkPlaces -- Version %0.3f\n", VERSION);
+               printf ("Linux DarkPlaces -- Version %0.3f (build %i)\n", VERSION, buildnumber);
        }
 
        oldtime = Sys_FloatTime () - 0.1;