[quake3-commits] r1590 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Sep 14 15:28:59 EDT 2009
Author: icculus
Date: 2009-09-14 15:28:59 -0400 (Mon, 14 Sep 2009)
New Revision: 1590
Modified:
trunk/code/qcommon/common.c
Log:
Minor reworking to check command line cvars before Com_InitZoneMemory().
This lets you set com_zoneMegs from the command line (although still not
from a config file, but oh well).
Fixes Bugzilla #2571.
Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c 2009-09-14 16:41:48 UTC (rev 1589)
+++ trunk/code/qcommon/common.c 2009-09-14 19:28:59 UTC (rev 1590)
@@ -1397,9 +1397,11 @@
void Com_InitZoneMemory( void ) {
cvar_t *cv;
- //FIXME: 05/01/06 com_zoneMegs is useless right now as neither q3config.cfg nor
- // Com_StartupVariable have been executed by this point. The net result is that
- // s_zoneTotal will always be set to the default value.
+ // Please note: com_zoneMegs can only be set on the command line, and
+ // not in q3config.cfg or Com_StartupVariable, as they haven't been
+ // executed by this point. It's a chicken and egg problem. We need the
+ // memory manager configured to handle those places where you would
+ // configure the memory manager.
// allocate the random block zone
cv = Cvar_Get( "com_zoneMegs", DEF_COMZONEMEGS_S, CVAR_LATCH | CVAR_ARCHIVE );
@@ -2550,12 +2552,12 @@
// Swap_Init ();
Cbuf_Init ();
+ // override anything from the config files with command line args
+ Com_StartupVariable( NULL );
+
Com_InitZoneMemory();
Cmd_Init ();
- // override anything from the config files with command line args
- Com_StartupVariable( NULL );
-
// get the developer cvar set as early as possible
Com_StartupVariable( "developer" );
More information about the quake3-commits
mailing list