Browse Source

Set synth and has-gui flags during clap discovery

Signed-off-by: falkTX <falktx@falktx.com>
pull/1723/head
falkTX 2 years ago
parent
commit
6435102228
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      source/discovery/carla-discovery.cpp

+ 13
- 0
source/discovery/carla-discovery.cpp View File

@@ -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<const clap_plugin_params_t*>( const clap_plugin_params_t* const params = static_cast<const clap_plugin_params_t*>(
plugin->get_extension(plugin, CLAP_EXT_PARAMS)); plugin->get_extension(plugin, CLAP_EXT_PARAMS));


#ifdef CLAP_WINDOW_API_NATIVE
const clap_plugin_gui_t* const gui = static_cast<const clap_plugin_gui_t*>(
plugin->get_extension(plugin, CLAP_EXT_GUI));
#endif

if (audioPorts != nullptr) if (audioPorts != nullptr)
{ {
clap_audio_port_info_t info; 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) if (desc->features != nullptr)
category = getPluginCategoryFromClapFeatures(desc->features); 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) if (doInit)
{ {
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


Loading…
Cancel
Save