mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
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:
parent
1f521aadb2
commit
6a6ef2a53a
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue