From e6ea87063774e4a0cf9653afbd29841c566da1a0 Mon Sep 17 00:00:00 2001 From: stephena Date: Fri, 15 Dec 2006 20:22:29 +0000 Subject: [PATCH] Moved settings file version to Version.hxx, since I don't want to have to recompile the whole codebase when it changes :) git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1218 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/common/Version.hxx | 10 +++++++++- stella/src/emucore/Settings.cxx | 4 ++-- stella/src/emucore/Settings.hxx | 12 ++---------- stella/src/macosx/SettingsMACOSX.cxx | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/stella/src/common/Version.hxx b/stella/src/common/Version.hxx index d05dc5ea4..517d78646 100644 --- a/stella/src/common/Version.hxx +++ b/stella/src/common/Version.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: Version.hxx,v 1.17 2006-12-08 16:48:56 stephena Exp $ +// $Id: Version.hxx,v 1.18 2006-12-15 20:22:29 stephena Exp $ //============================================================================ #ifndef VERSION_HXX @@ -27,4 +27,12 @@ #define STELLA_VERSION STELLA_BASE_VERSION #endif +// Specifies the minimum version of the settings file that's valid +// for this version of Stella. If the settings file is too old, +// the internal defaults are used. +// For each new release, this should only be bumped if there have been +// major changes in some settings; changes which could stop Stella from +// actually working. +#define STELLA_SETTINGS_VERSION "2.3_alpha" + #endif diff --git a/stella/src/emucore/Settings.cxx b/stella/src/emucore/Settings.cxx index fdf31b3a4..4e8d43d06 100644 --- a/stella/src/emucore/Settings.cxx +++ b/stella/src/emucore/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.102 2006-12-15 17:52:03 stephena Exp $ +// $Id: Settings.cxx,v 1.103 2006-12-15 20:22:29 stephena Exp $ //============================================================================ #include @@ -111,7 +111,7 @@ void Settings::loadConfig() if(getline(in, line)) { string minVersion = "; Version "; - minVersion += MIN_SETTINGS_VERSION; + minVersion += STELLA_SETTINGS_VERSION; if(line.find("; Version") != 0 || line < minVersion) { cout << "Error: Settings file too old, using internal defaults\n"; diff --git a/stella/src/emucore/Settings.hxx b/stella/src/emucore/Settings.hxx index 10df3d141..383cea84f 100644 --- a/stella/src/emucore/Settings.hxx +++ b/stella/src/emucore/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.29 2006-12-15 17:52:03 stephena Exp $ +// $Id: Settings.hxx,v 1.30 2006-12-15 20:22:29 stephena Exp $ //============================================================================ #ifndef SETTINGS_HXX @@ -24,19 +24,11 @@ class OSystem; #include "Array.hxx" #include "bspf.hxx" -// Specifies the minimum version of the settings file that's valid -// for this version of Stella. If the settings file is too old, -// the internal defaults are used. -// For each new release, this should only be bumped if there have been -// major changes in some settings; changes which could stop Stella from -// actually working. -#define MIN_SETTINGS_VERSION "2.3_alpha" - /** This class provides an interface for accessing frontend specific settings. @author Stephen Anthony - @version $Id: Settings.hxx,v 1.29 2006-12-15 17:52:03 stephena Exp $ + @version $Id: Settings.hxx,v 1.30 2006-12-15 20:22:29 stephena Exp $ */ class Settings { diff --git a/stella/src/macosx/SettingsMACOSX.cxx b/stella/src/macosx/SettingsMACOSX.cxx index 512f1aae5..66bd0386c 100644 --- a/stella/src/macosx/SettingsMACOSX.cxx +++ b/stella/src/macosx/SettingsMACOSX.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: SettingsMACOSX.cxx,v 1.14 2006-12-15 17:52:03 stephena Exp $ +// $Id: SettingsMACOSX.cxx,v 1.15 2006-12-15 20:22:29 stephena Exp $ //============================================================================ #include @@ -59,7 +59,7 @@ void SettingsMACOSX::loadConfig() // Check if the settings plist file is valid prefsGetString("plist_version", cvalue); - if(cvalue[0] == 0 || string(cvalue) < string(MIN_SETTINGS_VERSION)) + if(cvalue[0] == 0 || string(cvalue) < string(STELLA_SETTINGS_VERSION)) return; // Read key/value pairs from the plist file