gamelist.xml files are no longer loaded from the ROMs/system directories.

This commit is contained in:
Leon Styhre 2022-12-20 20:20:02 +01:00
parent e56eaeb2bd
commit 1bbed6cc04
2 changed files with 23 additions and 6 deletions

View file

@ -1095,14 +1095,30 @@ SystemData* SystemData::getPrev() const
std::string SystemData::getGamelistPath(bool forWrite) const
{
std::string filePath;
std::string filePath {mRootFolder->getPath() + "/gamelist.xml"};
const std::string gamelistPath {Utils::FileSystem::getHomePath() +
"/.emulationstation/gamelists/" + mName};
filePath = mRootFolder->getPath() + "/gamelist.xml";
if (Utils::FileSystem::exists(filePath))
return filePath;
if (Utils::FileSystem::exists(filePath)) {
if (Settings::getInstance()->getBool("LegacyGamelistFileLocation")) {
return filePath;
}
else {
#if defined(_WIN64)
LOG(LogWarning) << "Found a gamelist.xml file in \""
<< Utils::String::replace(mRootFolder->getPath(), "/", "\\")
<< "\\\" which will not get loaded, move it to \""
<< Utils::String::replace(gamelistPath, "/", "\\")
<< "\\\" or otherwise delete it";
#else
LOG(LogWarning) << "Found a gamelist.xml file in \"" << mRootFolder->getPath()
<< "/\" which will not get loaded, move it to \"" << gamelistPath
<< "/\" or otherwise delete it";
#endif
}
}
filePath = Utils::FileSystem::getHomePath() + "/.emulationstation/gamelists/" + mName +
"/gamelist.xml";
filePath = gamelistPath + "/gamelist.xml";
// Make sure the directory exists if we're going to write to it,
// or crashes will happen.

View file

@ -289,6 +289,7 @@ void Settings::setDefaults()
mBoolMap["DebugSkipInputLogging"] = {false, false};
mBoolMap["DebugSkipMissingThemeFiles"] = {false, false};
mBoolMap["DebugSkipMissingThemeFilesCustomCollections"] = {true, true};
mBoolMap["LegacyGamelistFileLocation"] = {false, false};
mStringMap["OpenGLVersion"] = {"", ""};
mStringMap["ROMDirectory"] = {"", ""};
mStringMap["UIMode_passkey"] = {"uuddlrlrba", "uuddlrlrba"};