From 943a4669d3cd3f4b41b84cc80161ececa491061c Mon Sep 17 00:00:00 2001 From: stephena Date: Mon, 11 Nov 2002 02:55:16 +0000 Subject: [PATCH] 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 --- stella/src/ui/common/Settings.cxx | 12 +++++++++++- stella/src/ui/common/Settings.hxx | 6 +++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/stella/src/ui/common/Settings.cxx b/stella/src/ui/common/Settings.cxx index 4bcbdb4da..0c323ead9 100644 --- a/stella/src/ui/common/Settings.cxx +++ b/stella/src/ui/common/Settings.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // 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 @@ -50,6 +50,8 @@ Settings::Settings() userDefinedProperties.set("Display.Width", "-1"); userDefinedProperties.set("Display.YStart", "-1"); userDefinedProperties.set("Display.Height", "-1"); + + theMergePropertiesFlag = false; #endif } @@ -222,6 +224,14 @@ bool Settings::handleCommandLineArgs(int argc, char* argv[]) if((value >= 100) && (value <= 256)) 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 else { diff --git a/stella/src/ui/common/Settings.hxx b/stella/src/ui/common/Settings.hxx index b1078920b..d1e1591c8 100644 --- a/stella/src/ui/common/Settings.hxx +++ b/stella/src/ui/common/Settings.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // 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 @@ -97,6 +97,10 @@ class Settings #ifdef DEVELOPER_SUPPORT // User-modified properties Properties userDefinedProperties; + + // Whether to save user-defined properties to a file or + // merge into the propertiesset file for future use + bool theMergePropertiesFlag; #endif };