From bbe70fc8ff76a3ab3b6b351156b0efba10dc7bb9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 20 Jul 2013 11:23:16 +0100 Subject: [PATCH] Fix LV2 UI extensions in ui-bridges --- source/bridges/CarlaBridgeUI-LV2.cpp | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/source/bridges/CarlaBridgeUI-LV2.cpp b/source/bridges/CarlaBridgeUI-LV2.cpp index dda64cc9d..dd4f744d7 100644 --- a/source/bridges/CarlaBridgeUI-LV2.cpp +++ b/source/bridges/CarlaBridgeUI-LV2.cpp @@ -434,22 +434,15 @@ public: if (fDescriptor->extension_data != nullptr) { - for (uint32_t i=0; i < fRdfUiDescriptor->ExtensionCount; ++i) - { - if (std::strcmp(fRdfUiDescriptor->Extensions[i], LV2_PROGRAMS__UIInterface) == 0) - { - fExt.options = (const LV2_Options_Interface*)fDescriptor->extension_data(LV2_OPTIONS__interface); - fExt.idle = (const LV2UI_Idle_Interface*)fDescriptor->extension_data(LV2_UI__idleInterface); - fExt.programs = (const LV2_Programs_UI_Interface*)fDescriptor->extension_data(LV2_PROGRAMS__UIInterface); - - // check if invalid - if (fExt.idle != nullptr && fExt.idle->idle == nullptr) - fExt.idle = nullptr; - - if (fExt.programs != nullptr && fExt.programs->select_program == nullptr) - fExt.programs = nullptr; - } - } + fExt.programs = (const LV2_Programs_UI_Interface*)fDescriptor->extension_data(LV2_PROGRAMS__UIInterface); + fExt.options = (const LV2_Options_Interface*)fDescriptor->extension_data(LV2_OPTIONS__interface); + fExt.idle = (const LV2UI_Idle_Interface*)fDescriptor->extension_data(LV2_UI__idleInterface); + + // check if invalid + if (fExt.programs != nullptr && fExt.programs->select_program == nullptr) + fExt.programs = nullptr; + if (fExt.idle != nullptr && fExt.idle->idle == nullptr) + fExt.idle = nullptr; } return true;