mirror of https://github.com/stella-emu/stella.git
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
This commit is contained in:
parent
7b84459e83
commit
e6ea870637
|
@ -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
|
||||
|
|
|
@ -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 <cassert>
|
||||
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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 <cassert>
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue