Browse Source

Support LV2 makeSONameResident, just in case

tags/1.9.7
falkTX 9 years ago
parent
commit
df7dee17f6
3 changed files with 30 additions and 19 deletions
  1. +14
    -10
      source/backend/plugin/CarlaPluginLV2.cpp
  2. +11
    -7
      source/bridges-ui/CarlaBridgeUI-LV2.cpp
  3. +5
    -2
      source/utils/CarlaLv2Utils.hpp

+ 14
- 10
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -146,15 +146,16 @@ const uint32_t kFeatureIdUiInstanceAccess = 21;
const uint32_t kFeatureIdUiIdleInterface = 22;
const uint32_t kFeatureIdUiFixedSize = 23;
const uint32_t kFeatureIdUiMakeResident = 24;
const uint32_t kFeatureIdUiNoUserResize = 25;
const uint32_t kFeatureIdUiParent = 26;
const uint32_t kFeatureIdUiPortMap = 27;
const uint32_t kFeatureIdUiPortSubscribe = 28;
const uint32_t kFeatureIdUiResize = 29;
const uint32_t kFeatureIdUiTouch = 30;
const uint32_t kFeatureIdExternalUi = 31;
const uint32_t kFeatureIdExternalUiOld = 32;
const uint32_t kFeatureCountAll = 33;
const uint32_t kFeatureIdUiMakeResident2 = 25;
const uint32_t kFeatureIdUiNoUserResize = 26;
const uint32_t kFeatureIdUiParent = 27;
const uint32_t kFeatureIdUiPortMap = 28;
const uint32_t kFeatureIdUiPortSubscribe = 29;
const uint32_t kFeatureIdUiResize = 30;
const uint32_t kFeatureIdUiTouch = 31;
const uint32_t kFeatureIdExternalUi = 32;
const uint32_t kFeatureIdExternalUiOld = 33;
const uint32_t kFeatureCountAll = 34;

// -----------------------------------------------------

@@ -5235,7 +5236,7 @@ public:
break;
}
}
if (std::strcmp(uri, LV2_UI__makeResident) == 0)
if (std::strcmp(uri, LV2_UI__makeResident) == 0 || std::strcmp(uri, LV2_UI__makeSONameResident) == 0)
canDelete = false;
}

@@ -5431,6 +5432,9 @@ public:
fFeatures[kFeatureIdUiMakeResident]->URI = LV2_UI__makeResident;
fFeatures[kFeatureIdUiMakeResident]->data = nullptr;

fFeatures[kFeatureIdUiMakeResident2]->URI = LV2_UI__makeSONameResident;
fFeatures[kFeatureIdUiMakeResident2]->data = nullptr;

fFeatures[kFeatureIdUiNoUserResize]->URI = LV2_UI__noUserResize;
fFeatures[kFeatureIdUiNoUserResize]->data = nullptr;



+ 11
- 7
source/bridges-ui/CarlaBridgeUI-LV2.cpp View File

@@ -100,13 +100,14 @@ const uint32_t kFeatureIdUridUnmap = 7;
const uint32_t kFeatureIdUiIdleInterface = 8;
const uint32_t kFeatureIdUiFixedSize = 9;
const uint32_t kFeatureIdUiMakeResident = 10;
const uint32_t kFeatureIdUiNoUserResize = 11;
const uint32_t kFeatureIdUiParent = 12;
const uint32_t kFeatureIdUiPortMap = 13;
const uint32_t kFeatureIdUiPortSubscribe = 14;
const uint32_t kFeatureIdUiResize = 15;
const uint32_t kFeatureIdUiTouch = 16;
const uint32_t kFeatureCount = 17;
const uint32_t kFeatureIdUiMakeResident2 = 11;
const uint32_t kFeatureIdUiNoUserResize = 12;
const uint32_t kFeatureIdUiParent = 13;
const uint32_t kFeatureIdUiPortMap = 14;
const uint32_t kFeatureIdUiPortSubscribe = 15;
const uint32_t kFeatureIdUiResize = 16;
const uint32_t kFeatureIdUiTouch = 17;
const uint32_t kFeatureCount = 18;

// -------------------------------------------------------------------------

@@ -319,6 +320,9 @@ public:
fFeatures[kFeatureIdUiMakeResident]->URI = LV2_UI__makeResident;
fFeatures[kFeatureIdUiMakeResident]->data = nullptr;

fFeatures[kFeatureIdUiMakeResident2]->URI = LV2_UI__makeSONameResident;
fFeatures[kFeatureIdUiMakeResident2]->data = nullptr;

fFeatures[kFeatureIdUiNoUserResize]->URI = LV2_UI__noUserResize;
fFeatures[kFeatureIdUiNoUserResize]->data = nullptr;



+ 5
- 2
source/utils/CarlaLv2Utils.hpp View File

@@ -99,8 +99,9 @@

#define LV2_MIDI_LL__MidiPort "http://ll-plugins.nongnu.org/lv2/ext/MidiPort"

#define LV2_UI__Qt5UI LV2_UI_PREFIX "Qt5UI"
#define LV2_UI__makeResident LV2_UI_PREFIX "makeResident"
#define LV2_UI__Qt5UI LV2_UI_PREFIX "Qt5UI"
#define LV2_UI__makeResident LV2_UI_PREFIX "makeResident"
#define LV2_UI__makeSONameResident LV2_UI_PREFIX "makeSONameResident"

// -----------------------------------------------------------------------
// Custom Atom types
@@ -1525,6 +1526,8 @@ bool is_lv2_ui_feature_supported(const LV2_URI uri) noexcept
return true;
if (std::strcmp(uri, LV2_UI__makeResident) == 0)
return true;
if (std::strcmp(uri, LV2_UI__makeSONameResident) == 0)
return true;
if (std::strcmp(uri, LV2_UI__noUserResize) == 0)
return true;
if (std::strcmp(uri, LV2_UI__parent) == 0)


Loading…
Cancel
Save