mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Merge pull request #10885 from JosJuice/android-graphics-mods
Android: Add graphics mods support to GUI
This commit is contained in:
@ -120,24 +120,15 @@ void GraphicsModListWidget::RefreshModList()
|
||||
|
||||
std::set<std::string> groups;
|
||||
|
||||
for (const auto& mod : m_mod_group.GetMods())
|
||||
for (const GraphicsModConfig& mod : m_mod_group.GetMods())
|
||||
{
|
||||
if (mod.m_groups.empty())
|
||||
continue;
|
||||
|
||||
for (const auto& group : mod.m_groups)
|
||||
{
|
||||
for (const GraphicsTargetGroupConfig& group : mod.m_groups)
|
||||
groups.insert(group.m_name);
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& mod : m_mod_group.GetMods())
|
||||
for (const GraphicsModConfig& mod : m_mod_group.GetMods())
|
||||
{
|
||||
// Group only mods shouldn't be shown
|
||||
if (mod.m_features.empty())
|
||||
continue;
|
||||
|
||||
// If the group doesn't exist in the available mod's features, skip
|
||||
// If no group matches the mod's features, or if the mod has no features, skip it
|
||||
if (std::none_of(mod.m_features.begin(), mod.m_features.end(),
|
||||
[&groups](const GraphicsModFeatureConfig& feature) {
|
||||
return groups.count(feature.m_group) == 1;
|
||||
|
@ -168,6 +168,11 @@ const std::vector<GraphicsModConfig>& GraphicsModGroupConfig::GetMods() const
|
||||
return m_graphics_mods;
|
||||
}
|
||||
|
||||
std::vector<GraphicsModConfig>& GraphicsModGroupConfig::GetMods()
|
||||
{
|
||||
return m_graphics_mods;
|
||||
}
|
||||
|
||||
GraphicsModConfig* GraphicsModGroupConfig::GetMod(const std::string& absolute_path) const
|
||||
{
|
||||
if (const auto iter = m_path_to_graphics_mod.find(absolute_path);
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
u32 GetChangeCount() const;
|
||||
|
||||
const std::vector<GraphicsModConfig>& GetMods() const;
|
||||
std::vector<GraphicsModConfig>& GetMods();
|
||||
|
||||
GraphicsModConfig* GetMod(const std::string& absolute_path) const;
|
||||
|
||||
|
Reference in New Issue
Block a user