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
This commit is contained in:
stephena 2007-01-01 18:21:04 +00:00
parent f059f28c02
commit 72b771cf33
3 changed files with 8 additions and 40 deletions

View File

@ -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

View File

@ -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 <cassert>
@ -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

View File

@ -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 <cassert>
@ -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)