From 0c10ec3c75d45fb381162e0052836340afe792fb Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 15 Sep 2020 16:39:52 +0200 Subject: [PATCH] Case-insensitive compare name to detect plugin duplicates In some cases LV2/VST and VST2/VST3 use slightly different naming conventions e.g. "MDA ..fx" vs "mda ..fx". --- libs/ardour/plugin_manager.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 9885dab514..e475644279 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -281,7 +281,7 @@ PluginManager::detect_name_ambiguities (PluginInfoList* pil) for (PluginInfoList::iterator i = pil->begin(); i != pil->end();) { PluginInfoPtr& p = *i; ++i; - if (i != pil->end() && (*i)->name == p->name) { + if (i != pil->end() && PBD::downcase ((*i)->name) == PBD::downcase (p->name)) { /* mark name as ambiguous IFF ambiguity can be resolved * by listing number of audio outputs. * This is used in the instrument selector. @@ -303,12 +303,12 @@ PluginManager::detect_type_ambiguities (PluginInfoList& pil) case 0: break; case 1: - if (dup.back()->name != (*i)->name) { + if (PBD::downcase (dup.back()->name) != PBD::downcase ((*i)->name)) { dup.clear (); } break; default: - if (dup.back()->name != (*i)->name) { + if (PBD::downcase (dup.back()->name) != PBD::downcase ((*i)->name)) { /* found multiple plugins with same name */ bool typediff = false; bool chandiff = false;