From 6435102228900a51389544559be348e3a47dbc10 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 10 Oct 2022 12:06:44 +0100 Subject: [PATCH] Set synth and has-gui flags during clap discovery Signed-off-by: falkTX --- source/discovery/carla-discovery.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp index bb58f095d..e730a5b41 100644 --- a/source/discovery/carla-discovery.cpp +++ b/source/discovery/carla-discovery.cpp @@ -1976,6 +1976,11 @@ static void do_clap_check(lib_t& libHandle, const char* const filename, const bo const clap_plugin_params_t* const params = static_cast( plugin->get_extension(plugin, CLAP_EXT_PARAMS)); + #ifdef CLAP_WINDOW_API_NATIVE + const clap_plugin_gui_t* const gui = static_cast( + plugin->get_extension(plugin, CLAP_EXT_GUI)); + #endif + if (audioPorts != nullptr) { clap_audio_port_info_t info; @@ -2053,6 +2058,14 @@ static void do_clap_check(lib_t& libHandle, const char* const filename, const bo if (desc->features != nullptr) category = getPluginCategoryFromClapFeatures(desc->features); + if (category == PLUGIN_CATEGORY_SYNTH) + hints |= PLUGIN_IS_SYNTH; + + #ifdef CLAP_WINDOW_API_NATIVE + if (gui != nullptr) + hints |= PLUGIN_HAS_CUSTOM_UI; + #endif + if (doInit) { // -----------------------------------------------------------------------