Add -mem arg for compat with dos or linux quake ports (and because -mem mb is more readable than -heapsize kb).

This commit is contained in:
Shpoike 2020-06-19 22:32:27 +01:00
parent 1f521aadb2
commit 6a6ef2a53a

View file

@ -120,11 +120,17 @@ int main(int argc, char *argv[])
parms.memsize = DEFAULT_MEMORY;
if (COM_CheckParm("-heapsize"))
{
{ //in kb
t = COM_CheckParm("-heapsize") + 1;
if (t < com_argc)
parms.memsize = Q_atoi(com_argv[t]) * 1024;
}
else if (COM_CheckParm("-mem"))
{ //in mb, matching vanilla's arg on dos or linux.
t = COM_CheckParm("-mem") + 1;
if (t < com_argc)
parms.memsize = Q_atoi(com_argv[t]) * 1024*1024;
}
parms.membase = malloc (parms.memsize);