mirror of https://github.com/stella-emu/stella.git
First pass at conditional saving of the settings file. Basically, the
settings will only be saved when they haven't changed from the defaults. This is probably of limited use on ordinary systems, but is helpful for smaller systems using flash-RAM as storage (WinCE/GP2X), since multiple saves wears out the hardware quicker. This breaks the OSX port; I'll fix it in a day or two. I'm hoping this will resolve the issues of certain settings not being saved in OSX as well. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1017 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
a48670693a
commit
b4a2268bd1
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: CheatManager.cxx,v 1.7 2006-01-11 01:17:08 stephena Exp $
|
// $Id: CheatManager.cxx,v 1.8 2006-03-06 02:26:15 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -288,7 +288,7 @@ void CheatManager::loadCheats(const string& md5sum)
|
||||||
// (and remove the key from the settings, so they won't get set again)
|
// (and remove the key from the settings, so they won't get set again)
|
||||||
string cheats = myOSystem->settings().getString("cheat");
|
string cheats = myOSystem->settings().getString("cheat");
|
||||||
if(cheats != "")
|
if(cheats != "")
|
||||||
myOSystem->settings().setString("cheat", "", false);
|
myOSystem->settings().setString("cheat", "");
|
||||||
|
|
||||||
CheatCodeMap::iterator iter = myCheatMap.find(md5sum);
|
CheatCodeMap::iterator iter = myCheatMap.find(md5sum);
|
||||||
if(iter == myCheatMap.end() && cheats == "")
|
if(iter == myCheatMap.end() && cheats == "")
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: SoundSDL.cxx,v 1.28 2006-01-06 00:31:55 stephena Exp $
|
// $Id: SoundSDL.cxx,v 1.29 2006-03-06 02:26:16 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifdef SOUND_SUPPORT
|
#ifdef SOUND_SUPPORT
|
||||||
|
@ -272,7 +272,7 @@ void SoundSDL::setChannels(uInt32 channels)
|
||||||
if(channels == 1 || channels == 2)
|
if(channels == 1 || channels == 2)
|
||||||
{
|
{
|
||||||
myNumChannels = channels;
|
myNumChannels = channels;
|
||||||
myOSystem->settings().setInt("channels", myNumChannels, false);
|
myOSystem->settings().setInt("channels", myNumChannels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Settings.cxx,v 1.78 2006-03-05 01:18:42 stephena Exp $
|
// $Id: Settings.cxx,v 1.79 2006-03-06 02:26:16 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -32,64 +32,59 @@ Settings::Settings(OSystem* osystem)
|
||||||
// Add this settings object to the OSystem
|
// Add this settings object to the OSystem
|
||||||
myOSystem->attach(this);
|
myOSystem->attach(this);
|
||||||
|
|
||||||
// First create the settings array
|
// Add options that are common to all versions of Stella
|
||||||
myCapacity = 40;
|
setInternal("video", "soft");
|
||||||
mySettings = new Setting[myCapacity];
|
setInternal("dirtyrects", "true");
|
||||||
mySize = 0;
|
setInternal("ppblend", "77");
|
||||||
|
|
||||||
// Now fill it with options that are common to all versions of Stella
|
setInternal("gl_filter", "nearest");
|
||||||
set("video", "soft");
|
setInternal("gl_aspect", "2.0");
|
||||||
set("dirtyrects", "true");
|
setInternal("gl_fsmax", "false");
|
||||||
set("ppblend", "77");
|
setInternal("gl_lib", "");
|
||||||
|
|
||||||
set("gl_filter", "nearest");
|
setInternal("zoom", "2");
|
||||||
set("gl_aspect", "2.0");
|
setInternal("fullscreen", "false");
|
||||||
set("gl_fsmax", "false");
|
setInternal("center", "true");
|
||||||
set("gl_lib", "");
|
setInternal("grabmouse", "false");
|
||||||
|
setInternal("palette", "standard");
|
||||||
|
setInternal("debugheight", "0");
|
||||||
|
|
||||||
set("zoom", "2");
|
setInternal("sound", "true");
|
||||||
set("fullscreen", "false");
|
setInternal("fragsize", "512");
|
||||||
set("center", "true");
|
setInternal("freq", "31400");
|
||||||
set("grabmouse", "false");
|
setInternal("tiafreq", "31400");
|
||||||
set("palette", "standard");
|
setInternal("volume", "100");
|
||||||
set("debugheight", "0");
|
setInternal("clipvol", "true");
|
||||||
|
|
||||||
set("sound", "true");
|
setInternal("keymap", "");
|
||||||
set("fragsize", "512");
|
setInternal("joymap", "");
|
||||||
set("freq", "31400");
|
setInternal("joyaxismap", "");
|
||||||
set("tiafreq", "31400");
|
setInternal("joyhatmap", "");
|
||||||
set("volume", "100");
|
setInternal("paddle", "0");
|
||||||
set("clipvol", "true");
|
setInternal("sa1", "left");
|
||||||
|
setInternal("sa2", "right");
|
||||||
|
setInternal("joymouse", "false");
|
||||||
|
setInternal("p1speed", "50");
|
||||||
|
setInternal("p2speed", "50");
|
||||||
|
setInternal("p3speed", "50");
|
||||||
|
setInternal("p4speed", "50");
|
||||||
|
|
||||||
set("keymap", "");
|
setInternal("showinfo", "false");
|
||||||
set("joymap", "");
|
|
||||||
set("joyaxismap", "");
|
|
||||||
set("joyhatmap", "");
|
|
||||||
set("paddle", "0");
|
|
||||||
set("sa1", "left");
|
|
||||||
set("sa2", "right");
|
|
||||||
set("joymouse", "false");
|
|
||||||
set("p1speed", "50");
|
|
||||||
set("p2speed", "50");
|
|
||||||
set("p3speed", "50");
|
|
||||||
set("p4speed", "50");
|
|
||||||
|
|
||||||
set("showinfo", "false");
|
setInternal("ssdir", "");
|
||||||
|
setInternal("ssname", "romname");
|
||||||
|
setInternal("sssingle", "false");
|
||||||
|
|
||||||
set("ssdir", "");
|
setInternal("romdir", "");
|
||||||
set("ssname", "romname");
|
setInternal("lastrom", "");
|
||||||
set("sssingle", "false");
|
setInternal("modtime", ""); // romdir last modification time
|
||||||
|
|
||||||
set("romdir", "");
|
|
||||||
set("lastrom", "");
|
|
||||||
set("modtime", ""); // romdir last modification time
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Settings::~Settings()
|
Settings::~Settings()
|
||||||
{
|
{
|
||||||
// Free the settings array
|
myInternalSettings.clear();
|
||||||
delete[] mySettings;
|
myExternalSettings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -135,8 +130,8 @@ void Settings::loadConfig()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Only settings which have been previously set are valid
|
// Only settings which have been previously set are valid
|
||||||
if(contains(key))
|
if(int idx = getInternalPos(key) != -1)
|
||||||
set(key, value);
|
setInternal(key, value, idx, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
in.close();
|
in.close();
|
||||||
|
@ -163,27 +158,27 @@ bool Settings::loadCommandLine(int argc, char** argv)
|
||||||
}
|
}
|
||||||
else if(key == "listrominfo")
|
else if(key == "listrominfo")
|
||||||
{
|
{
|
||||||
set(key, "true", false); // this confusing line means set 'listrominfo'
|
setExternal(key, "true");
|
||||||
return true; // to true, but don't save to the settings file
|
return true;
|
||||||
}
|
}
|
||||||
else if(key == "debug") // this doesn't make Stella exit
|
else if(key == "debug") // this doesn't make Stella exit
|
||||||
{
|
{
|
||||||
set(key, "true", false); // don't save this to the config file either
|
setExternal(key, "true");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(key == "holdreset") // this doesn't make Stella exit
|
else if(key == "holdreset") // this doesn't make Stella exit
|
||||||
{
|
{
|
||||||
set(key, "true", false); // don't save this to the config file either
|
setExternal(key, "true");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(key == "holdselect") // this doesn't make Stella exit
|
else if(key == "holdselect") // this doesn't make Stella exit
|
||||||
{
|
{
|
||||||
set(key, "true", false); // don't save this to the config file either
|
setExternal(key, "true");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(key == "holdbutton0") // this doesn't make Stella exit
|
else if(key == "holdbutton0") // this doesn't make Stella exit
|
||||||
{
|
{
|
||||||
set(key, "true", false); // don't save this to the config file either
|
setExternal(key, "true");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +191,10 @@ bool Settings::loadCommandLine(int argc, char** argv)
|
||||||
|
|
||||||
// Settings read from the commandline must not be saved to
|
// Settings read from the commandline must not be saved to
|
||||||
// the rc-file, unless they were previously set
|
// the rc-file, unless they were previously set
|
||||||
set(key, value, false);
|
if(int idx = getInternalPos(key) != -1)
|
||||||
|
setInternal(key, value, idx, true);
|
||||||
|
else
|
||||||
|
setExternal(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -210,57 +208,57 @@ void Settings::validate()
|
||||||
|
|
||||||
s = getString("video");
|
s = getString("video");
|
||||||
if(s != "soft" && s != "gl")
|
if(s != "soft" && s != "gl")
|
||||||
set("video", "soft");
|
setInternal("video", "soft");
|
||||||
|
|
||||||
#ifdef DISPLAY_OPENGL
|
#ifdef DISPLAY_OPENGL
|
||||||
s = getString("gl_filter");
|
s = getString("gl_filter");
|
||||||
if(s != "linear" && s != "nearest")
|
if(s != "linear" && s != "nearest")
|
||||||
set("gl_filter", "nearest");
|
setInternal("gl_filter", "nearest");
|
||||||
|
|
||||||
float f = getFloat("gl_aspect");
|
float f = getFloat("gl_aspect");
|
||||||
if(f < 1.1 || f > 2.0)
|
if(f < 1.1 || f > 2.0)
|
||||||
set("gl_aspect", "2.0");
|
setInternal("gl_aspect", "2.0");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SOUND_SUPPORT
|
#ifdef SOUND_SUPPORT
|
||||||
i = getInt("fragsize");
|
i = getInt("fragsize");
|
||||||
if(i != 256 && i != 512 && i != 1024 && i != 2048 && i != 4096)
|
if(i != 256 && i != 512 && i != 1024 && i != 2048 && i != 4096)
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
set("fragsize", "2048");
|
setInternal("fragsize", "2048");
|
||||||
#else
|
#else
|
||||||
set("fragsize", "512");
|
setInternal("fragsize", "512");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
i = getInt("volume");
|
i = getInt("volume");
|
||||||
if(i < 0 || i > 100)
|
if(i < 0 || i > 100)
|
||||||
set("volume", "100");
|
setInternal("volume", "100");
|
||||||
i = getInt("freq");
|
i = getInt("freq");
|
||||||
if(i < 0 || i > 48000)
|
if(i < 0 || i > 48000)
|
||||||
set("freq", "31400");
|
setInternal("freq", "31400");
|
||||||
i = getInt("tiafreq");
|
i = getInt("tiafreq");
|
||||||
if(i < 0 || i > 48000)
|
if(i < 0 || i > 48000)
|
||||||
set("tiafreq", "31400");
|
setInternal("tiafreq", "31400");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
i = getInt("zoom");
|
i = getInt("zoom");
|
||||||
if(i < 1 || i > 6)
|
if(i < 1 || i > 6)
|
||||||
set("zoom", "2");
|
setInternal("zoom", "2");
|
||||||
|
|
||||||
i = getInt("paddle");
|
i = getInt("paddle");
|
||||||
if(i < 0 || i > 3)
|
if(i < 0 || i > 3)
|
||||||
set("paddle", "0");
|
setInternal("paddle", "0");
|
||||||
|
|
||||||
s = getString("palette");
|
s = getString("palette");
|
||||||
if(s != "standard" && s != "original" && s != "z26")
|
if(s != "standard" && s != "original" && s != "z26")
|
||||||
set("palette", "standard");
|
setInternal("palette", "standard");
|
||||||
|
|
||||||
i = getInt("ppblend");
|
i = getInt("ppblend");
|
||||||
if(i < 0) set("ppblend", "0");
|
if(i < 0) setInternal("ppblend", "0");
|
||||||
if(i > 100) set("ppblend", "100");
|
if(i > 100) setInternal("ppblend", "100");
|
||||||
|
|
||||||
s = getString("romname");
|
s = getString("romname");
|
||||||
if(s != "romname" && s != "md5sum")
|
if(s != "romname" && s != "md5sum")
|
||||||
set("ssname", "romname");
|
setInternal("ssname", "romname");
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -365,6 +363,22 @@ void Settings::usage()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Settings::saveConfig()
|
void Settings::saveConfig()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Do a quick scan of the internal settings to see if any have
|
||||||
|
// changed. If not, we don't need to save them at all.
|
||||||
|
bool settingsChanged = false;
|
||||||
|
for(unsigned int i = 0; i < myInternalSettings.size(); ++i)
|
||||||
|
{
|
||||||
|
if(myInternalSettings[i].value != myInternalSettings[i].initialValue)
|
||||||
|
{
|
||||||
|
settingsChanged = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!settingsChanged)
|
||||||
|
return;
|
||||||
|
|
||||||
ofstream out(myOSystem->configOutputFilename().c_str());
|
ofstream out(myOSystem->configOutputFilename().c_str());
|
||||||
if(!out || !out.is_open())
|
if(!out || !out.is_open())
|
||||||
{
|
{
|
||||||
|
@ -388,153 +402,254 @@ void Settings::saveConfig()
|
||||||
<< ";" << endl;
|
<< ";" << endl;
|
||||||
|
|
||||||
// Write out each of the key and value pairs
|
// Write out each of the key and value pairs
|
||||||
for(unsigned int i = 0; i < mySize; ++i)
|
for(unsigned int i = 0; i < myInternalSettings.size(); ++i)
|
||||||
if(mySettings[i].save)
|
{
|
||||||
out << mySettings[i].key << " = " << mySettings[i].value << endl;
|
out << myInternalSettings[i].key << " = " <<
|
||||||
|
myInternalSettings[i].value << endl;
|
||||||
|
}
|
||||||
|
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Settings::set(const string& key, const string& value, bool save)
|
void Settings::setInt(const string& key, const int value)
|
||||||
{
|
|
||||||
// See if the setting already exists
|
|
||||||
for(unsigned int i = 0; i < mySize; ++i)
|
|
||||||
{
|
|
||||||
// If a key is already present in the array, then we assume
|
|
||||||
// that it was set by the emulation core and must be saved
|
|
||||||
// to the rc-file.
|
|
||||||
if(key == mySettings[i].key)
|
|
||||||
{
|
|
||||||
mySettings[i].value = value;
|
|
||||||
mySettings[i].save = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// See if the array needs to be resized
|
|
||||||
if(mySize == myCapacity)
|
|
||||||
{
|
|
||||||
// Yes, so we'll make the array twice as large
|
|
||||||
Setting* newSettings = new Setting[myCapacity * 2];
|
|
||||||
|
|
||||||
for(unsigned int i = 0; i < mySize; ++i)
|
|
||||||
{
|
|
||||||
newSettings[i] = mySettings[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
delete[] mySettings;
|
|
||||||
|
|
||||||
mySettings = newSettings;
|
|
||||||
myCapacity *= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add new property to the array
|
|
||||||
mySettings[mySize].key = key;
|
|
||||||
mySettings[mySize].value = value;
|
|
||||||
mySettings[mySize].save = save;
|
|
||||||
|
|
||||||
++mySize;
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
void Settings::setInt(const string& key, const int value, bool save)
|
|
||||||
{
|
{
|
||||||
ostringstream stream;
|
ostringstream stream;
|
||||||
stream << value;
|
stream << value;
|
||||||
|
|
||||||
set(key, stream.str(), save);
|
if(int idx = getInternalPos(key) != -1)
|
||||||
|
setInternal(key, stream.str(), idx);
|
||||||
|
else
|
||||||
|
setExternal(key, stream.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Settings::setFloat(const string& key, const float value, bool save)
|
void Settings::setFloat(const string& key, const float value)
|
||||||
{
|
{
|
||||||
ostringstream stream;
|
ostringstream stream;
|
||||||
stream << value;
|
stream << value;
|
||||||
|
|
||||||
set(key, stream.str(), save);
|
if(int idx = getInternalPos(key) != -1)
|
||||||
|
setInternal(key, stream.str(), idx);
|
||||||
|
else
|
||||||
|
setExternal(key, stream.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Settings::setBool(const string& key, const bool value, bool save)
|
void Settings::setBool(const string& key, const bool value)
|
||||||
{
|
{
|
||||||
ostringstream stream;
|
ostringstream stream;
|
||||||
stream << value;
|
stream << value;
|
||||||
|
|
||||||
set(key, stream.str(), save);
|
if(int idx = getInternalPos(key) != -1)
|
||||||
|
setInternal(key, stream.str(), idx);
|
||||||
|
else
|
||||||
|
setExternal(key, stream.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Settings::setString(const string& key, const string& value, bool save)
|
void Settings::setString(const string& key, const string& value)
|
||||||
{
|
{
|
||||||
ostringstream stream;
|
if(int idx = getInternalPos(key) != -1)
|
||||||
stream << value;
|
setInternal(key, value, idx);
|
||||||
|
else
|
||||||
set(key, stream.str(), save);
|
setExternal(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
int Settings::getInt(const string& key) const
|
int Settings::getInt(const string& key) const
|
||||||
{
|
{
|
||||||
// Try to find the named setting and answer its value
|
// Try to find the named setting and answer its value
|
||||||
for(unsigned int i = 0; i < mySize; ++i)
|
int idx = -1;
|
||||||
if(key == mySettings[i].key)
|
if((idx = getInternalPos(key)) != -1)
|
||||||
return (int) atoi(mySettings[i].value.c_str());
|
return (int) atoi(myInternalSettings[idx].value.c_str());
|
||||||
|
else if((idx = getExternalPos(key)) != -1)
|
||||||
return 0;
|
return (int) atoi(myExternalSettings[idx].value.c_str());
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
float Settings::getFloat(const string& key) const
|
float Settings::getFloat(const string& key) const
|
||||||
{
|
{
|
||||||
// Try to find the named setting and answer its value
|
// Try to find the named setting and answer its value
|
||||||
for(unsigned int i = 0; i < mySize; ++i)
|
int idx = -1;
|
||||||
if(key == mySettings[i].key)
|
if((idx = getInternalPos(key)) != -1)
|
||||||
return (float) atof(mySettings[i].value.c_str());
|
return (float) atof(myInternalSettings[idx].value.c_str());
|
||||||
|
else if((idx = getExternalPos(key)) != -1)
|
||||||
return -1.0;
|
return (float) atof(myExternalSettings[idx].value.c_str());
|
||||||
|
else
|
||||||
|
return -1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool Settings::getBool(const string& key) const
|
bool Settings::getBool(const string& key) const
|
||||||
{
|
{
|
||||||
// Try to find the named setting and answer its value
|
// Try to find the named setting and answer its value
|
||||||
for(unsigned int i = 0; i < mySize; ++i)
|
int idx = -1;
|
||||||
|
if((idx = getInternalPos(key)) != -1)
|
||||||
{
|
{
|
||||||
if(key == mySettings[i].key)
|
if(myInternalSettings[idx].value == "1" ||
|
||||||
{
|
myInternalSettings[idx].value == "true")
|
||||||
if(mySettings[i].value == "1" || mySettings[i].value == "true")
|
return true;
|
||||||
return true;
|
else if(myInternalSettings[idx].value == "0" ||
|
||||||
else if(mySettings[i].value == "0" || mySettings[i].value == "false")
|
myInternalSettings[idx].value == "false")
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if((idx = getExternalPos(key)) != -1)
|
||||||
return false;
|
{
|
||||||
|
if(myInternalSettings[idx].value == "1" ||
|
||||||
|
myInternalSettings[idx].value == "true")
|
||||||
|
return true;
|
||||||
|
else if(myInternalSettings[idx].value == "0" ||
|
||||||
|
myInternalSettings[idx].value == "false")
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
const string& Settings::getString(const string& key) const
|
const string& Settings::getString(const string& key) const
|
||||||
{
|
{
|
||||||
// Try to find the named setting and answer its value
|
// Try to find the named setting and answer its value
|
||||||
for(unsigned int i = 0; i < mySize; ++i)
|
int idx = -1;
|
||||||
if(key == mySettings[i].key)
|
if((idx = getInternalPos(key)) != -1)
|
||||||
return mySettings[i].value;
|
return myInternalSettings[idx].value;
|
||||||
|
else if((idx = getExternalPos(key)) != -1)
|
||||||
return EmptyString;
|
return myExternalSettings[idx].value;
|
||||||
|
else
|
||||||
|
return EmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool Settings::contains(const string& key)
|
int Settings::getInternalPos(const string& key) const
|
||||||
{
|
{
|
||||||
// Try to find the named setting
|
for(unsigned int i = 0; i < myInternalSettings.size(); ++i)
|
||||||
for(unsigned int i = 0; i < mySize; ++i)
|
if(myInternalSettings[i].key == key)
|
||||||
if(key == mySettings[i].key)
|
return i;
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
int Settings::getExternalPos(const string& key) const
|
||||||
|
{
|
||||||
|
for(unsigned int i = 0; i < myExternalSettings.size(); ++i)
|
||||||
|
if(myExternalSettings[i].key == key)
|
||||||
|
return i;
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
int Settings::setInternal(const string& key, const string& value,
|
||||||
|
int pos, bool useAsInitial)
|
||||||
|
{
|
||||||
|
int idx = -1;
|
||||||
|
|
||||||
|
if(pos != -1 && pos >= 0 && pos < (int)myInternalSettings.size() &&
|
||||||
|
myInternalSettings[pos].key == key)
|
||||||
|
{
|
||||||
|
idx = pos;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(unsigned int i = 0; i < myInternalSettings.size(); ++i)
|
||||||
|
{
|
||||||
|
if(myInternalSettings[i].key == key)
|
||||||
|
{
|
||||||
|
idx = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(idx != -1)
|
||||||
|
{
|
||||||
|
myInternalSettings[idx].key = key;
|
||||||
|
myInternalSettings[idx].value = value;
|
||||||
|
if(useAsInitial) myInternalSettings[idx].initialValue = value;
|
||||||
|
|
||||||
|
/*cerr << "modify internal: key = " << key
|
||||||
|
<< ", value = " << value
|
||||||
|
<< " @ index = " << idx
|
||||||
|
<< endl;*/
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Setting setting;
|
||||||
|
setting.key = key;
|
||||||
|
setting.value = value;
|
||||||
|
if(useAsInitial) setting.initialValue = value;
|
||||||
|
|
||||||
|
myInternalSettings.push_back(setting);
|
||||||
|
idx = myInternalSettings.size() - 1;
|
||||||
|
|
||||||
|
/*cerr << "insert internal: key = " << key
|
||||||
|
<< ", value = " << value
|
||||||
|
<< " @ index = " << idx
|
||||||
|
<< endl;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
int Settings::setExternal(const string& key, const string& value,
|
||||||
|
int pos, bool useAsInitial)
|
||||||
|
{
|
||||||
|
int idx = -1;
|
||||||
|
|
||||||
|
if(pos != -1 && pos >= 0 && pos < (int)myExternalSettings.size() &&
|
||||||
|
myExternalSettings[pos].key == key)
|
||||||
|
{
|
||||||
|
idx = pos;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(unsigned int i = 0; i < myExternalSettings.size(); ++i)
|
||||||
|
{
|
||||||
|
if(myExternalSettings[i].key == key)
|
||||||
|
{
|
||||||
|
idx = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(idx != -1)
|
||||||
|
{
|
||||||
|
myExternalSettings[idx].key = key;
|
||||||
|
myExternalSettings[idx].value = value;
|
||||||
|
if(useAsInitial) myExternalSettings[idx].initialValue = value;
|
||||||
|
|
||||||
|
/*cerr << "modify external: key = " << key
|
||||||
|
<< ", value = " << value
|
||||||
|
<< " @ index = " << idx
|
||||||
|
<< endl;*/
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Setting setting;
|
||||||
|
setting.key = key;
|
||||||
|
setting.value = value;
|
||||||
|
if(useAsInitial) setting.initialValue = value;
|
||||||
|
|
||||||
|
myExternalSettings.push_back(setting);
|
||||||
|
idx = myExternalSettings.size() - 1;
|
||||||
|
|
||||||
|
/*cerr << "insert external: key = " << key
|
||||||
|
<< ", value = " << value
|
||||||
|
<< " @ index = " << idx
|
||||||
|
<< endl;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Settings.hxx,v 1.26 2005-11-19 22:26:13 stephena Exp $
|
// $Id: Settings.hxx,v 1.27 2006-03-06 02:26:16 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef SETTINGS_HXX
|
#ifndef SETTINGS_HXX
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
class OSystem;
|
class OSystem;
|
||||||
|
|
||||||
|
#include "Array.hxx"
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ class OSystem;
|
||||||
This class provides an interface for accessing frontend specific settings.
|
This class provides an interface for accessing frontend specific settings.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: Settings.hxx,v 1.26 2005-11-19 22:26:13 stephena Exp $
|
@version $Id: Settings.hxx,v 1.27 2006-03-06 02:26:16 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class Settings
|
class Settings
|
||||||
{
|
{
|
||||||
|
@ -113,59 +114,32 @@ class Settings
|
||||||
|
|
||||||
@param key The key of the setting
|
@param key The key of the setting
|
||||||
@param value The value to assign to the setting
|
@param value The value to assign to the setting
|
||||||
@param save Whether this setting should be saved to the rc-file.
|
|
||||||
*/
|
*/
|
||||||
void setInt(const string& key, const int value, bool save = true);
|
void setInt(const string& key, const int value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the value associated with key to the given value.
|
Set the value associated with key to the given value.
|
||||||
|
|
||||||
@param key The key of the setting
|
@param key The key of the setting
|
||||||
@param value The value to assign to the setting
|
@param value The value to assign to the setting
|
||||||
@param save Whether this setting should be saved to the rc-file.
|
|
||||||
*/
|
*/
|
||||||
void setFloat(const string& key, const float value, bool save = true);
|
void setFloat(const string& key, const float value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the value associated with key to the given value.
|
Set the value associated with key to the given value.
|
||||||
|
|
||||||
@param key The key of the setting
|
@param key The key of the setting
|
||||||
@param value The value to assign to the setting
|
@param value The value to assign to the setting
|
||||||
@param save Whether this setting should be saved to the rc-file.
|
|
||||||
*/
|
*/
|
||||||
void setBool(const string& key, const bool value, bool save = true);
|
void setBool(const string& key, const bool value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the value associated with key to the given value.
|
Set the value associated with key to the given value.
|
||||||
|
|
||||||
@param key The key of the setting
|
@param key The key of the setting
|
||||||
@param value The value to assign to the setting
|
@param value The value to assign to the setting
|
||||||
@param save Whether this setting should be saved to the rc-file.
|
|
||||||
*/
|
*/
|
||||||
void setString(const string& key, const string& value, bool save = true);
|
void setString(const string& key, const string& value);
|
||||||
|
|
||||||
protected:
|
|
||||||
void set(const string& key, const string& value, bool save = true);
|
|
||||||
|
|
||||||
// The parent OSystem object
|
|
||||||
OSystem* myOSystem;
|
|
||||||
|
|
||||||
// Structure used for storing settings
|
|
||||||
struct Setting
|
|
||||||
{
|
|
||||||
string key;
|
|
||||||
string value;
|
|
||||||
bool save;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Pointer to a dynamically allocated array of settings
|
|
||||||
Setting* mySettings;
|
|
||||||
|
|
||||||
// Size of the settings array (i.e. the number of <key,value> pairs)
|
|
||||||
unsigned int mySize;
|
|
||||||
|
|
||||||
// Test whether the given setting is present in the array
|
|
||||||
bool contains(const string& key);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Copy constructor isn't supported by this class so make it private
|
// Copy constructor isn't supported by this class so make it private
|
||||||
|
@ -175,15 +149,49 @@ class Settings
|
||||||
Settings& operator = (const Settings&);
|
Settings& operator = (const Settings&);
|
||||||
|
|
||||||
// Trim leading and following whitespace from a string
|
// Trim leading and following whitespace from a string
|
||||||
string trim(string& str)
|
static string trim(string& str)
|
||||||
{
|
{
|
||||||
string::size_type first = str.find_first_not_of(' ');
|
string::size_type first = str.find_first_not_of(' ');
|
||||||
return (first == string::npos) ? string() :
|
return (first == string::npos) ? string() :
|
||||||
str.substr(first, str.find_last_not_of(' ')-first+1);
|
str.substr(first, str.find_last_not_of(' ')-first+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Current capacity of the settings array
|
protected:
|
||||||
unsigned int myCapacity;
|
// The parent OSystem object
|
||||||
|
OSystem* myOSystem;
|
||||||
|
|
||||||
|
// Structure used for storing settings
|
||||||
|
struct Setting
|
||||||
|
{
|
||||||
|
string key;
|
||||||
|
string value;
|
||||||
|
string initialValue;
|
||||||
|
};
|
||||||
|
typedef Common::Array<Setting> SettingsArray;
|
||||||
|
|
||||||
|
const SettingsArray& getInternalSettings() const
|
||||||
|
{ return myInternalSettings; }
|
||||||
|
const SettingsArray& getExternalSettings() const
|
||||||
|
{ return myExternalSettings; }
|
||||||
|
|
||||||
|
/** Get position in specified array of 'key' */
|
||||||
|
int getInternalPos(const string& key) const;
|
||||||
|
int getExternalPos(const string& key) const;
|
||||||
|
|
||||||
|
/** Add key,value pair to specified array at specified position */
|
||||||
|
int setInternal(const string& key, const string& value,
|
||||||
|
int pos = -1, bool useAsInitial = false);
|
||||||
|
int setExternal(const string& key, const string& value,
|
||||||
|
int pos = -1, bool useAsInitial = false);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Holds key,value pairs that are necessary for Stella to
|
||||||
|
// function and must be saved on each program exit.
|
||||||
|
SettingsArray myInternalSettings;
|
||||||
|
|
||||||
|
// Holds auxiliary key,value pairs that shouldn't be saved on
|
||||||
|
// program exit.
|
||||||
|
SettingsArray myExternalSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: LauncherDialog.cxx,v 1.40 2006-03-05 01:18:42 stephena Exp $
|
// $Id: LauncherDialog.cxx,v 1.41 2006-03-06 02:26:16 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -54,7 +54,7 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
mySelectedItem(0)
|
mySelectedItem(0)
|
||||||
{
|
{
|
||||||
const GUI::Font& font = instance()->launcherFont();
|
const GUI::Font& font = instance()->launcherFont();
|
||||||
// const GUI::Font& font = instance()->font();
|
|
||||||
const int fontHeight = font.getFontHeight();
|
const int fontHeight = font.getFontHeight();
|
||||||
const int bwidth = (_w - 2 * 10 - 8 * (4 - 1)) / 4;
|
const int bwidth = (_w - 2 * 10 - 8 * (4 - 1)) / 4;
|
||||||
const int bheight = font.getLineHeight() + 4;
|
const int bheight = font.getLineHeight() + 4;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: SettingsMACOSX.cxx,v 1.8 2006-01-15 23:43:40 markgrebe Exp $
|
// $Id: SettingsMACOSX.cxx,v 1.9 2006-03-06 02:26:16 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -32,17 +32,17 @@
|
||||||
#include "SettingsMACOSX.hxx"
|
#include "SettingsMACOSX.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void prefsSetString(char *key, char *value);
|
void prefsSetString(char *key, char *value);
|
||||||
void prefsGetString(char *key, char *value);
|
void prefsGetString(char *key, char *value);
|
||||||
void prefsSave(void);
|
void prefsSave(void);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
SettingsMACOSX::SettingsMACOSX(OSystem* osystem)
|
SettingsMACOSX::SettingsMACOSX(OSystem* osystem)
|
||||||
: Settings(osystem)
|
: Settings(osystem)
|
||||||
{
|
{
|
||||||
set("video", "gl"); // Use opengl mode by default
|
setInternal("video", "gl"); // Use opengl mode by default
|
||||||
set("gl_lib", "libGL.so");
|
setInternal("gl_lib", "libGL.so");
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -58,11 +58,14 @@ void SettingsMACOSX::loadConfig()
|
||||||
|
|
||||||
// Write out each of the key and value pairs
|
// Write out each of the key and value pairs
|
||||||
for(uInt32 i = 0; i < mySize; ++i)
|
for(uInt32 i = 0; i < mySize; ++i)
|
||||||
{
|
{
|
||||||
prefsGetString((char *) mySettings[i].key.c_str(),cvalue);
|
prefsGetString((char *) mySettings[i].key.c_str(), cvalue);
|
||||||
if (cvalue[0] != 0)
|
if(cvalue[0] != 0)
|
||||||
mySettings[i].value.assign(cvalue);
|
{
|
||||||
}
|
mySettings[i].value.assign(cvalue);
|
||||||
|
mySettings[i].save = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -70,11 +73,12 @@ void SettingsMACOSX::saveConfig()
|
||||||
{
|
{
|
||||||
// Write out each of the key and value pairs
|
// Write out each of the key and value pairs
|
||||||
for(uInt32 i = 0; i < mySize; ++i)
|
for(uInt32 i = 0; i < mySize; ++i)
|
||||||
|
{
|
||||||
if(mySettings[i].save)
|
if(mySettings[i].save)
|
||||||
{
|
{
|
||||||
prefsSetString((char *) mySettings[i].key.c_str(),
|
prefsSetString((char *) mySettings[i].key.c_str(),
|
||||||
(char *) mySettings[i].value.c_str());
|
(char *) mySettings[i].value.c_str());
|
||||||
}
|
}
|
||||||
prefsSave();
|
}
|
||||||
|
prefsSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,22 +13,19 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: SettingsMACOSX.hxx,v 1.3 2005-06-16 01:11:29 stephena Exp $
|
// $Id: SettingsMACOSX.hxx,v 1.4 2006-03-06 02:26:16 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef SETTINGS_MAC_OSX_HXX
|
#ifndef SETTINGS_MAC_OSX_HXX
|
||||||
#define SETTINGS_MAX_OSX_HXX
|
#define SETTINGS_MAX_OSX_HXX
|
||||||
|
|
||||||
#include "bspf.hxx"
|
class OSystem;
|
||||||
|
|
||||||
class Console;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class defines Macintosh OSX system specific settings.
|
This class defines Macintosh OSX system specific settings.
|
||||||
|
|
||||||
@author Mark Grebe
|
@author Mark Grebe
|
||||||
@version $Id: SettingsMACOSX.hxx,v 1.3 2005-06-16 01:11:29 stephena Exp $
|
@version $Id: SettingsMACOSX.hxx,v 1.4 2006-03-06 02:26:16 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class SettingsMACOSX : public Settings
|
class SettingsMACOSX : public Settings
|
||||||
{
|
{
|
||||||
|
@ -55,9 +52,7 @@ class SettingsMACOSX : public Settings
|
||||||
This method should be called to save the current settings to the
|
This method should be called to save the current settings to the
|
||||||
standard Mac preferences.
|
standard Mac preferences.
|
||||||
*/
|
*/
|
||||||
|
void saveConfig();
|
||||||
void saveConfig();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: SettingsUNIX.cxx,v 1.16 2006-01-14 21:36:29 stephena Exp $
|
// $Id: SettingsUNIX.cxx,v 1.17 2006-03-06 02:26:16 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
@ -25,8 +25,8 @@ SettingsUNIX::SettingsUNIX(OSystem* osystem)
|
||||||
: Settings(osystem)
|
: Settings(osystem)
|
||||||
{
|
{
|
||||||
// This argument is only valid for Linux/UNIX, and will eventually be removed
|
// This argument is only valid for Linux/UNIX, and will eventually be removed
|
||||||
set("accurate", "false");
|
setInternal("accurate", "false");
|
||||||
set("gl_lib", "libGL.so");
|
setInternal("gl_lib", "libGL.so");
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
Loading…
Reference in New Issue