Browse Source

Set PLUGIN_HAS_CUSTOM_EMBED_UI hint during discovery

Signed-off-by: falkTX <falktx@falktx.com>
fix-audiofile-buffering
falkTX 1 year ago
parent
commit
e6d25394ab
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 38 additions and 0 deletions
  1. +22
    -0
      source/backend/utils/CachedPlugins.cpp
  2. +16
    -0
      source/discovery/carla-discovery.cpp

+ 22
- 0
source/backend/utils/CachedPlugins.cpp View File

@@ -264,7 +264,29 @@ static const CarlaCachedPluginInfo* get_cached_plugin_lv2(Lv2WorldClass& lv2Worl
Lilv::UIs lilvUIs(lilvPlugin.get_uis());

if (lilvUIs.size() > 0)
{
info.hints |= CB::PLUGIN_HAS_CUSTOM_UI;

LILV_FOREACH(uis, it, lilvUIs)
{
Lilv::UI lilvUI(lilvUIs.get(it));
lv2World.load_resource(lilvUI.get_uri());

#if defined(CARLA_OS_MAC)
if (lilvUI.is_a(lv2World.ui_cocoa))
#elif defined(CARLA_OS_WIN)
if (lilvUI.is_a(lv2World.ui_windows))
#elif defined(HAVE_X11)
if (lilvUI.is_a(lv2World.ui_x11))
#else
if (false)
#endif
{
info.hints |= CB::PLUGIN_HAS_CUSTOM_EMBED_UI;
break;
}
}
}
#ifdef CARLA_OS_LINUX
else if (lilvPlugin.get_modgui_resources_directory().as_uri() != nullptr)
info.hints |= CB::PLUGIN_HAS_CUSTOM_UI;


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

@@ -1241,7 +1241,12 @@ static bool do_vst2_check(lib_t& libHandle, const char* const filename, const bo
uint parameters = static_cast<uint>(std::max(0, effect->numParams));

if (effect->flags & effFlagsHasEditor)
{
hints |= PLUGIN_HAS_CUSTOM_UI;
#ifndef BUILD_BRIDGE
hints |= PLUGIN_HAS_CUSTOM_EMBED_UI;
#endif
}

if (effect->flags & effFlagsIsSynth)
{
@@ -1783,7 +1788,12 @@ static bool do_vst3_check(lib_t& libHandle, const char* const filename, const bo
if (v3_plugin_view** const view = v3_cpp_obj(controller)->create_view(controller, "editor"))
{
if (v3_cpp_obj(view)->is_platform_type_supported(view, V3_VIEW_PLATFORM_TYPE_NATIVE) == V3_TRUE)
{
hints |= PLUGIN_HAS_CUSTOM_UI;
#ifndef BUILD_BRIDGE
hints |= PLUGIN_HAS_CUSTOM_EMBED_UI;
#endif
}

v3_cpp_obj_unref(view);
}
@@ -2187,7 +2197,13 @@ static bool do_clap_check(lib_t& libHandle, const char* const filename, const bo

#ifdef CLAP_WINDOW_API_NATIVE
if (gui != nullptr)
{
hints |= PLUGIN_HAS_CUSTOM_UI;
#ifndef BUILD_BRIDGE
if (gui->is_api_supported(plugin, CLAP_WINDOW_API_NATIVE, false))
hints |= PLUGIN_HAS_CUSTOM_EMBED_UI;
#endif
}
#endif

if (doInit)


Loading…
Cancel
Save