diff --git a/source/Makefile.mk b/source/Makefile.mk index df1d69e2a..cdec5e105 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -178,6 +178,7 @@ endif ifeq ($(HAVE_DGL),true) BASE_FLAGS += -DHAVE_DGL +BASE_FLAGS += -DHAVE_OPENGL BASE_FLAGS += -DDGL_NAMESPACE=CarlaDGL BASE_FLAGS += -DDGL_OPENGL BASE_FLAGS += -DDGL_FILE_BROWSER_DISABLED diff --git a/source/modules/distrho/DistrhoUIMain.cpp b/source/modules/distrho/DistrhoUIMain.cpp index 9b898bc7a..656eb30aa 100644 --- a/source/modules/distrho/DistrhoUIMain.cpp +++ b/source/modules/distrho/DistrhoUIMain.cpp @@ -34,7 +34,7 @@ # error unsupported format #endif -#if !DISTRHO_PLUGIN_WANT_DIRECT_ACCESS && !DISTRHO_PLUGIN_TARGET_JACK && !DISTRHO_PLUGIN_TARGET_VST2 && !DISTRHO_PLUGIN_TARGET_VST3 +#if !DISTRHO_PLUGIN_WANT_DIRECT_ACCESS && !defined(DISTRHO_PLUGIN_TARGET_CARLA) && !defined(DISTRHO_PLUGIN_TARGET_JACK) && !defined(DISTRHO_PLUGIN_TARGET_VST2) && !defined(DISTRHO_PLUGIN_TARGET_VST3) # ifdef DISTRHO_PLUGIN_TARGET_DSSI # define DISTRHO_IS_STANDALONE 1 # else diff --git a/source/modules/distrho/src/DistrhoPluginCarla.cpp b/source/modules/distrho/src/DistrhoPluginCarla.cpp index a3262f678..4878fad69 100644 --- a/source/modules/distrho/src/DistrhoPluginCarla.cpp +++ b/source/modules/distrho/src/DistrhoPluginCarla.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2021 Filipe Coelho + * Copyright (C) 2012-2022 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -55,7 +55,12 @@ class UICarla public: UICarla(const NativeHostDescriptor* const host, PluginExporter* const plugin) : fHost(host), - fUI(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, setSizeCallback, plugin->getInstancePointer()) + fUI(this, 0, plugin->getSampleRate(), + editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, + nullptr, // window size + nullptr, // TODO file request + nullptr, // bundle path + plugin->getInstancePointer()) { fUI.setWindowTitle(host->uiName); @@ -77,7 +82,7 @@ public: bool carla_idle() { - return fUI.idle(); + return fUI.plugin_idle(); } void carla_setParameterValue(const uint32_t index, const float value) @@ -131,11 +136,6 @@ protected: } #endif - void handleSetSize(const uint width, const uint height) - { - fUI.setWindowSize(width, height); - } - // --------------------------------------------- private: @@ -174,11 +174,6 @@ private: } #endif - static void setSizeCallback(void* ptr, uint width, uint height) - { - handlePtr->handleSetSize(width, height); - } - #undef handlePtr CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UICarla) @@ -502,10 +497,7 @@ private: void createUiIfNeeded() { if (fUiPtr == nullptr) - { - d_lastUiSampleRate = getSampleRate(); fUiPtr = new UICarla(getHostHandle(), &fPlugin); - } } #endif diff --git a/source/native-plugins/external b/source/native-plugins/external index 04544c544..edebaabb1 160000 --- a/source/native-plugins/external +++ b/source/native-plugins/external @@ -1 +1 @@ -Subproject commit 04544c544632bf3e67eb91ebe71ed7c5a1a8ddde +Subproject commit edebaabb1228ffb775f9d9a8395a858ba365cdf8