Enhancements: Add spaces to tags (#2079)

- Matching RDB format.
- Keep checks for old version to avoid breaking user enhancements, due to lack of a fixed control mechanism for upgrading
This commit is contained in:
Kimberly J Ortega 2021-07-11 21:00:28 -07:00 committed by zilmar
parent 9c1dd7640c
commit 9911126efe
2 changed files with 6 additions and 6 deletions

View File

@ -163,7 +163,7 @@ CEnhancement::CEnhancement(const char * Ident, const char * Entry) :
} }
Key.resize(Seperator); Key.resize(Seperator);
if (stricmp(Key.c_str(), "PluginList") == 0) if (stricmp(Key.c_str(), "PluginList") == 0 || stricmp(Key.c_str(), "Plugin List") == 0)
{ {
strvector Plugins = stdstr(&Pos[1]).Tokenize(","); strvector Plugins = stdstr(&Pos[1]).Tokenize(",");
for (size_t i = 0, n = Plugins.size(); i < n; i++) for (size_t i = 0, n = Plugins.size(); i < n; i++)
@ -175,11 +175,11 @@ CEnhancement::CEnhancement(const char * Ident, const char * Entry) :
{ {
m_Note = &Pos[1]; m_Note = &Pos[1];
} }
else if (stricmp(Key.c_str(), "OnByDefault") == 0) else if (stricmp(Key.c_str(), "OnByDefault") == 0 || stricmp(Key.c_str(), "On By Default") == 0)
{ {
m_OnByDefault = Pos[1] == '1'; m_OnByDefault = Pos[1] == '1';
} }
else if (stricmp(Key.c_str(), "OverClock") == 0) else if (stricmp(Key.c_str(), "Overclock") == 0)
{ {
SetOverClock(true, atoi(&Pos[1])); SetOverClock(true, atoi(&Pos[1]));
} }

View File

@ -323,15 +323,15 @@ void CEnhancmentFile::SaveCurrentSection(void)
} }
PluginList += List[i].c_str(); PluginList += List[i].c_str();
} }
Section += stdstr_f("PluginList=%s%s", PluginList.c_str() , m_LineFeed); Section += stdstr_f("Plugin List=%s%s", PluginList.c_str() , m_LineFeed);
} }
if (Enhancement.GetOnByDefault()) if (Enhancement.GetOnByDefault())
{ {
Section += stdstr_f("OnByDefault=1%s", m_LineFeed); Section += stdstr_f("On By Default=1%s", m_LineFeed);
} }
if (Enhancement.OverClock()) if (Enhancement.OverClock())
{ {
Section += stdstr_f("OverClock=%d%s", Enhancement.OverClockModifier(), m_LineFeed); Section += stdstr_f("Overclock=%d%s", Enhancement.OverClockModifier(), m_LineFeed);
} }
if (!Enhancement.GetNote().empty()) if (!Enhancement.GetNote().empty())
{ {