mirror of https://github.com/stella-emu/stella.git
Fix error in parsing settings file for 'empty' values.
This commit is contained in:
parent
020d8b18c2
commit
6b76031234
|
@ -226,8 +226,8 @@ void Settings::loadConfig()
|
|||
key = trim(key);
|
||||
value = trim(value);
|
||||
|
||||
// Check for absent key or value
|
||||
if((key.length() == 0) || (value.length() == 0))
|
||||
// Skip absent key
|
||||
if(key.length() == 0)
|
||||
continue;
|
||||
|
||||
// Only settings which have been previously set are valid
|
||||
|
|
|
@ -475,7 +475,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DeveloperDialog::loadSettings(SettingsSet set)
|
||||
{
|
||||
string prefix = set == SettingsSet::player ? "plr." : "dev.";
|
||||
const string& prefix = set == SettingsSet::player ? "plr." : "dev.";
|
||||
|
||||
myFrameStats[set] = instance().settings().getBool(prefix + "stats");
|
||||
myConsole[set] = instance().settings().getString(prefix + "console") == "7800" ? 1 : 0;
|
||||
|
@ -509,7 +509,7 @@ void DeveloperDialog::loadSettings(SettingsSet set)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DeveloperDialog::saveSettings(SettingsSet set)
|
||||
{
|
||||
string prefix = set == SettingsSet::player ? "plr." : "dev.";
|
||||
const string& prefix = set == SettingsSet::player ? "plr." : "dev.";
|
||||
|
||||
instance().settings().setValue(prefix + "stats", myFrameStats[set]);
|
||||
instance().settings().setValue(prefix + "console", myConsole[set] == 1 ? "7800" : "2600");
|
||||
|
|
Loading…
Reference in New Issue