Browse Source

Accept modguis as real UIs

tags/1.9.6
falkTX 9 years ago
parent
commit
edf17b97b2
3 changed files with 18 additions and 5 deletions
  1. +1
    -1
      source/backend/CarlaUtils.cpp
  2. +16
    -3
      source/backend/plugin/CarlaPluginLV2.cpp
  3. +1
    -1
      source/bridges-ui/CarlaBridgeUI.cpp

+ 1
- 1
source/backend/CarlaUtils.cpp View File

@@ -455,7 +455,7 @@ const CarlaCachedPluginInfo* carla_get_cached_plugin_info(CB::PluginType ptype,
// features // features
info.hints = 0x0; info.hints = 0x0;


if (lilvPlugin.get_uis().size() > 0 /*|| lilvPlugin.get_modgui_resources_directory().as_uri() != nullptr*/)
if (lilvPlugin.get_uis().size() > 0 || lilvPlugin.get_modgui_resources_directory().as_uri() != nullptr)
info.hints |= CB::PLUGIN_HAS_CUSTOM_UI; info.hints |= CB::PLUGIN_HAS_CUSTOM_UI;


{ {


+ 16
- 3
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -1269,6 +1269,10 @@ public:
fPipeServer.writeUiOptionsMessage(pData->engine->getSampleRate(), true, true, fLv2Options.windowTitle, frontendWinId); fPipeServer.writeUiOptionsMessage(pData->engine->getSampleRate(), true, true, fLv2Options.windowTitle, frontendWinId);


fPipeServer.writeShowMessage(); fPipeServer.writeShowMessage();
#ifndef BUILD_BRIDGE
if (fUI.rdfDescriptor->Type == LV2_UI_MOD)
pData->tryTransient();
#endif
} }
else else
{ {
@@ -4096,6 +4100,9 @@ public:
case LV2_UI_OLD_EXTERNAL: case LV2_UI_OLD_EXTERNAL:
bridgeBinary += CARLA_OS_SEP_STR "carla-bridge-lv2-external"; bridgeBinary += CARLA_OS_SEP_STR "carla-bridge-lv2-external";
break; break;
case LV2_UI_MOD:
bridgeBinary += CARLA_OS_SEP_STR "carla-bridge-lv2-modgui";
break;
default: default:
return nullptr; return nullptr;
} }
@@ -5034,8 +5041,8 @@ public:
// --------------------------------------------------------------- // ---------------------------------------------------------------
// find the most appropriate ui // find the most appropriate ui


int eQt4, eQt5, eGtk2, eGtk3, eCocoa, eWindows, eX11, eExt, iCocoa, iWindows, iX11, iExt, iFinal;
eQt4 = eQt5 = eGtk2 = eGtk3 = eCocoa = eWindows = eX11 = eExt = iCocoa = iWindows = iX11 = iExt = iFinal = -1;
int eQt4, eQt5, eGtk2, eGtk3, eCocoa, eWindows, eX11, eExt, eMod, iCocoa, iWindows, iX11, iExt, iFinal;
eQt4 = eQt5 = eGtk2 = eGtk3 = eCocoa = eWindows = eX11 = eExt = eMod = iCocoa = iWindows = iX11 = iExt = iFinal = -1;


#if defined(BUILD_BRIDGE) #if defined(BUILD_BRIDGE)
const bool preferUiBridges(false); const bool preferUiBridges(false);
@@ -5090,6 +5097,9 @@ public:
eExt = ii; eExt = ii;
iExt = ii; iExt = ii;
break; break;
case LV2_UI_MOD:
eMod = ii;
break;
default: default:
break; break;
} }
@@ -5123,6 +5133,8 @@ public:
#endif #endif
//else if (eExt >= 0) // TODO //else if (eExt >= 0) // TODO
// iFinal = eExt; // iFinal = eExt;
else if (eMod >= 0)
iFinal = eMod;
#ifndef LV2_UIS_ONLY_BRIDGES #ifndef LV2_UIS_ONLY_BRIDGES
# ifdef CARLA_OS_MAC # ifdef CARLA_OS_MAC
else if (iCocoa >= 0) else if (iCocoa >= 0)
@@ -5216,7 +5228,8 @@ public:


const LV2_Property uiType(fUI.rdfDescriptor->Type); const LV2_Property uiType(fUI.rdfDescriptor->Type);


if (iFinal == eQt4 || iFinal == eQt5 || iFinal == eGtk2 || iFinal == eGtk3 || iFinal == eCocoa || iFinal == eWindows || iFinal == eX11 || iFinal == eExt)
if (iFinal == eQt4 || iFinal == eQt5 || iFinal == eGtk2 || iFinal == eGtk3 ||
iFinal == eCocoa || iFinal == eWindows || iFinal == eX11 || iFinal == eExt || iFinal == eMod)
{ {
// ----------------------------------------------------------- // -----------------------------------------------------------
// initialize ui-bridge // initialize ui-bridge


+ 1
- 1
source/bridges-ui/CarlaBridgeUI.cpp View File

@@ -138,7 +138,7 @@ bool CarlaBridgeUI::msgReceived(const char* const msg) noexcept
return true; return true;
} }


if (std::strcmp(msg, "mprogram") == 0)
if (std::strcmp(msg, "midiprogram") == 0)
{ {
uint32_t bank, program; uint32_t bank, program;




Loading…
Cancel
Save