Placeholder entries in es_systems.xml are now skipped by default when creating the system directories and systemsinfo.txt files

Also added a CreatePlaceholderSystemDirectories option that can be manually set in es_settings.xml to still create placeholder directories
This commit is contained in:
Leon Styhre 2023-12-25 13:12:14 +01:00
parent 80a462abb3
commit 476230606b
2 changed files with 14 additions and 0 deletions

View file

@ -1134,6 +1134,19 @@ bool SystemData::createSystemDirectories()
continue; continue;
} }
if (commands.size() == 1 &&
Utils::String::toLower(commands.front()).find("placeholder") != std::string::npos) {
if (Settings::getInstance()->getBool("CreatePlaceholderSystemDirectories")) {
LOG(LogInfo) << "System \"" << name
<< "\" is a placeholder but creating directory anyway as "
"CreatePlaceholderSystemDirectories is set to true";
}
else {
LOG(LogInfo) << "System \"" << name << "\" is a placeholder, skipping entry";
continue;
}
}
themeFolder = system.child("theme").text().as_string(name.c_str()); themeFolder = system.child("theme").text().as_string(name.c_str());
// Check that the %ROMPATH% variable is actually used for the path element. // Check that the %ROMPATH% variable is actually used for the path element.

View file

@ -331,6 +331,7 @@ void Settings::setDefaults()
mBoolMap["DebugSkipMissingThemeFiles"] = {false, false}; mBoolMap["DebugSkipMissingThemeFiles"] = {false, false};
mBoolMap["DebugSkipMissingThemeFilesCustomCollections"] = {true, true}; mBoolMap["DebugSkipMissingThemeFilesCustomCollections"] = {true, true};
mBoolMap["LegacyGamelistFileLocation"] = {false, false}; mBoolMap["LegacyGamelistFileLocation"] = {false, false};
mBoolMap["CreatePlaceholderSystemDirectories"] = {false, false};
mStringMap["OpenGLVersion"] = {"", ""}; mStringMap["OpenGLVersion"] = {"", ""};
#if !defined(__ANDROID__) #if !defined(__ANDROID__)
mStringMap["ROMDirectory"] = {"", ""}; mStringMap["ROMDirectory"] = {"", ""};