diff --git a/out/boot.dol b/out/boot.dol index 90074002..3b164f7d 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/source/config/config.cpp b/source/config/config.cpp index 26350783..059a035b 100644 --- a/source/config/config.cpp +++ b/source/config/config.cpp @@ -273,6 +273,16 @@ void Config::remove(const std::string &domain, const std::string &key) m_domains[upperCase(domain)].erase(lowerCase(key)); } +void Config::removeCustomTitles(const std::string &domain, const std::string &key) +{ + if (domain.empty() || key.empty()) return; + //gprintf("remove %s\n", key.c_str()); + KeyMap::iterator i = m_groupCustomTitles.find(upperCase(domain)); + if (i == m_groupCustomTitles.end()) return; + m_changed = true; + m_domains[i->second].erase(lowerCase(key)); +} + void Config::setOptBool(const std::string &domain, const std::string &key, int val) { if (domain.empty() || key.empty()) return; diff --git a/source/config/config.hpp b/source/config/config.hpp index dd7cf872..a499d866 100644 --- a/source/config/config.hpp +++ b/source/config/config.hpp @@ -46,6 +46,7 @@ public: CColor getColor(const std::string &domain, const std::string &key, const CColor &defVal = CColor()); // Remove void remove(const std::string &domain, const std::string &key); + void removeCustomTitles(const std::string &domain, const std::string &key); // const std::string &firstDomain(void); const std::string &nextDomain(void); diff --git a/source/list/ListGenerator.cpp b/source/list/ListGenerator.cpp index d74f647d..69614d1d 100644 --- a/source/list/ListGenerator.cpp +++ b/source/list/ListGenerator.cpp @@ -267,7 +267,7 @@ static void Add_Plugin_Game(char *FullPath) return; } - /* Get roms's title without the extra ()'s or []'s */ + /* Get roms's filename without the extra ()'s or []'s */ string ShortName = m_plugin.GetRomName(FullPath); //gprintf("Add_Plugin_Game: fullName=%s, shortName=%s\n", FullPath, ShortName.c_str()); @@ -291,7 +291,18 @@ static void Add_Plugin_Game(char *FullPath) /* Get titles - Rom filename, custom title, and database xml title */ *strrchr(RomFilename, '.') = '\0';// remove extension - string customTitle = CustomTitles.getStringCustomTitles(m_plugin.PluginMagicWord, RomFilename, ""); + string customTitle; + customTitle = CustomTitles.getStringCustomTitles(m_plugin.PluginMagicWord, RomFilename, "");// old format + if(romID != "PLUGIN") + { + if(!customTitle.empty()) + { + CustomTitles.setString(platformName, romID, customTitle);// convert old format to new format + CustomTitles.removeCustomTitles(m_plugin.PluginMagicWord, RomFilename);// remove old format + } + else + customTitle = CustomTitles.getString(platformName, romID, "");// new format + } const char *gameTDB_Title = NULL; if(gameTDB.IsLoaded() && customTitle.empty() && m_cacheList.usePluginDBTitles)