Added -Dmerge commandline argument, which specifies whether or not

we want to merge any properties changes into the PropertiesSet.

In the X11 and SDL versions, this option also tells the Properties::load()
method to load the properties into memory, since we can't do a merge
unless the properties are stored in memory.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@132 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2002-11-11 02:55:16 +00:00
parent 25bde6512e
commit 943a4669d3
2 changed files with 16 additions and 2 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: Settings.cxx,v 1.4 2002-11-10 00:27:26 stephena Exp $ // $Id: Settings.cxx,v 1.5 2002-11-11 02:55:15 stephena Exp $
//============================================================================ //============================================================================
#ifdef DEVELOPER_SUPPORT #ifdef DEVELOPER_SUPPORT
@ -50,6 +50,8 @@ Settings::Settings()
userDefinedProperties.set("Display.Width", "-1"); userDefinedProperties.set("Display.Width", "-1");
userDefinedProperties.set("Display.YStart", "-1"); userDefinedProperties.set("Display.YStart", "-1");
userDefinedProperties.set("Display.Height", "-1"); userDefinedProperties.set("Display.Height", "-1");
theMergePropertiesFlag = false;
#endif #endif
} }
@ -222,6 +224,14 @@ bool Settings::handleCommandLineArgs(int argc, char* argv[])
if((value >= 100) && (value <= 256)) if((value >= 100) && (value <= 256))
userDefinedProperties.set("Display.Height", option); userDefinedProperties.set("Display.Height", option);
} }
else if(string(argv[i]) == "-Dmerge")
{
uInt32 option = atoi(argv[++i]);
if(option == 1)
theMergePropertiesFlag = true;
else if(option == 0)
theMergePropertiesFlag = false;
}
#endif #endif
else else
{ {

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: Settings.hxx,v 1.4 2002-11-10 00:27:26 stephena Exp $ // $Id: Settings.hxx,v 1.5 2002-11-11 02:55:16 stephena Exp $
//============================================================================ //============================================================================
#ifndef SETTINGS_HXX #ifndef SETTINGS_HXX
@ -97,6 +97,10 @@ class Settings
#ifdef DEVELOPER_SUPPORT #ifdef DEVELOPER_SUPPORT
// User-modified properties // User-modified properties
Properties userDefinedProperties; Properties userDefinedProperties;
// Whether to save user-defined properties to a file or
// merge into the propertiesset file for future use
bool theMergePropertiesFlag;
#endif #endif
}; };