From 72b771cf330c7a2942ca17dbdbec6491659e0662 Mon Sep 17 00:00:00 2001 From: stephena Date: Mon, 1 Jan 2007 18:21:04 +0000 Subject: [PATCH] Removed settings version logic from the last release, since it never really worked right anyway. Bumped version number for beta testing. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1262 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/common/Version.hxx | 12 ++---------- stella/src/emucore/Settings.cxx | 20 ++------------------ stella/src/macosx/SettingsMACOSX.cxx | 16 ++++------------ 3 files changed, 8 insertions(+), 40 deletions(-) diff --git a/stella/src/common/Version.hxx b/stella/src/common/Version.hxx index a219c8a8d..6f66cd78a 100644 --- a/stella/src/common/Version.hxx +++ b/stella/src/common/Version.hxx @@ -13,13 +13,13 @@ // 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.22 2007-01-01 18:04:40 stephena Exp $ +// $Id: Version.hxx,v 1.23 2007-01-01 18:21:04 stephena Exp $ //============================================================================ #ifndef VERSION_HXX #define VERSION_HXX -#define STELLA_BASE_VERSION "2.3.01" +#define STELLA_BASE_VERSION "2.3.02" #ifdef NIGHTLY_BUILD #define STELLA_VERSION STELLA_BASE_VERSION "pre-" NIGHTLY_BUILD @@ -27,12 +27,4 @@ #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" - #endif diff --git a/stella/src/emucore/Settings.cxx b/stella/src/emucore/Settings.cxx index 37ff5547b..2f26a0bba 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.112 2007-01-01 18:04:49 stephena Exp $ +// $Id: Settings.cxx,v 1.113 2007-01-01 18:21:04 stephena Exp $ //============================================================================ #include @@ -106,21 +106,6 @@ void Settings::loadConfig() return; } - // Get the first line, and parse the version string (if it exists) - // If we don't have the minimum settings version, then ignore - // this settings file. - if(getline(in, line)) - { - string minVersion = "; Version "; - minVersion += STELLA_SETTINGS_VERSION; - if(line.find("; Version") != 0 || line < minVersion) - { - cout << "Error: Settings file too old, using internal defaults\n"; - in.close(); - return; - } - } - while(getline(in, line)) { // Strip all whitespace and tabs from the line @@ -409,8 +394,7 @@ void Settings::saveConfig() return; } - out << "; Version " << STELLA_VERSION << endl - << "; Stella configuration file" << endl + out << "; Stella configuration file" << endl << ";" << endl << "; Lines starting with ';' are comments and are ignored." << endl << "; Spaces and tabs are ignored." << endl diff --git a/stella/src/macosx/SettingsMACOSX.cxx b/stella/src/macosx/SettingsMACOSX.cxx index 267c1a4a0..ff9262251 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.18 2007-01-01 18:04:55 stephena Exp $ +// $Id: SettingsMACOSX.cxx,v 1.19 2007-01-01 18:21:04 stephena Exp $ //============================================================================ #include @@ -42,9 +42,9 @@ extern "C" { SettingsMACOSX::SettingsMACOSX(OSystem* osystem) : Settings(osystem) { - setInternal("video", "gl"); // Use opengl mode by default - setInternal("gl_lib", ""); // Let the system decide which lib to use - setInternal("gl_vsync", "true"); // OSX almost always supports vsync; let's use it + setInternal("video", "gl"); // Use opengl mode by default + setInternal("gl_lib", "libGL.so"); // Try this one first, then let the system decide + setInternal("gl_vsync", "true"); // OSX almost always supports vsync; let's use it } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -58,11 +58,6 @@ void SettingsMACOSX::loadConfig() string key, value; char cvalue[2048]; - // Check if the settings plist file is valid - prefsGetString("stella_version", cvalue); - if(cvalue[0] == 0 || string(cvalue) < string(STELLA_SETTINGS_VERSION)) - return; - // Read key/value pairs from the plist file const SettingsArray& settings = getInternalSettings(); for(unsigned int i = 0; i < settings.size(); ++i) @@ -76,9 +71,6 @@ void SettingsMACOSX::loadConfig() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void SettingsMACOSX::saveConfig() { - // Write out plist version - prefsSetString("stella_version", STELLA_VERSION); - // Write out each of the key and value pairs const SettingsArray& settings = getInternalSettings(); for(unsigned int i = 0; i < settings.size(); ++i)