Force VST category to be "Instrument" for instruments.
authorRobin Gareus <robin@gareus.org>
Wed, 7 Nov 2018 22:05:54 +0000 (23:05 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 7 Nov 2018 22:05:54 +0000 (23:05 +0100)
This way it is picked up by the default PluginInfo::is_instrument()
method.

libs/ardour/plugin_manager.cc

index d5d98cb54f1a4f618fa6568aaf81aa425de5da69..aa151aa97505e40e7e97b143f47207eac911fb36 100644 (file)
@@ -1015,7 +1015,11 @@ PluginManager::windows_vst_discover (string path, bool cache_only)
 
                snprintf (buf, sizeof (buf), "%d", finfo->UniqueID);
                info->unique_id = buf;
-               info->category = finfo->Category;
+               if (finfo->isInstrument) {
+                       info->category = X_("Instrument");
+               } else {
+                       info->category = finfo->Category;
+               }
                info->path = path;
                info->creator = finfo->creator;
                info->index = 0;
@@ -1155,7 +1159,11 @@ PluginManager::mac_vst_discover (string path, bool cache_only)
 
                snprintf (buf, sizeof (buf), "%d", finfo->UniqueID);
                info->unique_id = buf;
-               info->category = finfo->Category;
+               if (finfo->isInstrument) {
+                       info->category = X_("Instrument");
+               } else {
+                       info->category = finfo->Category;
+               }
                info->path = path;
                info->creator = finfo->creator;
                info->index = 0;
@@ -1277,7 +1285,11 @@ PluginManager::lxvst_discover (string path, bool cache_only)
 
                snprintf (buf, sizeof (buf), "%d", finfo->UniqueID);
                info->unique_id = buf;
-               info->category = finfo->Category;
+               if (finfo->isInstrument) {
+                       info->category = X_("Instrument");
+               } else {
+                       info->category = finfo->Category;
+               }
                info->path = path;
                info->creator = finfo->creator;
                info->index = 0;