mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
Added a special 'all' shortcut variant.
This commit is contained in:
parent
b1a2b3f5ca
commit
27936131f3
|
@ -462,6 +462,8 @@ void ThemeData::loadFile(const std::map<std::string, std::string>& sysDataMap,
|
||||||
mSelectedVariant = Settings::getInstance()->getString("ThemeVariant");
|
mSelectedVariant = Settings::getInstance()->getString("ThemeVariant");
|
||||||
else
|
else
|
||||||
mSelectedVariant = mVariants.front();
|
mSelectedVariant = mVariants.front();
|
||||||
|
// Special shortcut variant to apply configuration to all defined variants.
|
||||||
|
mVariants.emplace_back("all");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCurrentThemeSet->second.capabilities.aspectRatios.size() > 0) {
|
if (mCurrentThemeSet->second.capabilities.aspectRatios.size() > 0) {
|
||||||
|
@ -771,6 +773,11 @@ ThemeData::ThemeCapability ThemeData::parseThemeCapabilities(const std::string&
|
||||||
<< "Found <variant> tag without name attribute, ignoring entry in \"" << capFile
|
<< "Found <variant> tag without name attribute, ignoring entry in \"" << capFile
|
||||||
<< "\"";
|
<< "\"";
|
||||||
}
|
}
|
||||||
|
else if (name == "all") {
|
||||||
|
LOG(LogWarning)
|
||||||
|
<< "Found <variant> tag using reserved name \"all\", ignoring entry in \""
|
||||||
|
<< capFile << "\"";
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
readVariant.name = name;
|
readVariant.name = name;
|
||||||
}
|
}
|
||||||
|
@ -985,7 +992,7 @@ void ThemeData::parseVariants(const pugi::xml_node& root)
|
||||||
<< "\" is not defined in capabilities.xml";
|
<< "\" is not defined in capabilities.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mSelectedVariant == viewKey) {
|
if (mSelectedVariant == viewKey || viewKey == "all") {
|
||||||
parseVariables(node);
|
parseVariables(node);
|
||||||
parseIncludes(node);
|
parseIncludes(node);
|
||||||
parseViews(node);
|
parseViews(node);
|
||||||
|
|
Loading…
Reference in a new issue