diff --git a/source/modules/dgl/Makefile b/source/modules/dgl/Makefile index 5c14445f2..fa44fcbf0 100644 --- a/source/modules/dgl/Makefile +++ b/source/modules/dgl/Makefile @@ -10,7 +10,7 @@ include ../Makefile.mk # ---------------------------------------------------------------------------------------------------------------------------- -BUILD_CXX_FLAGS += $(DGL_FLAGS) -DDGL_FILE_BROWSER_DISABLED -Isrc +BUILD_CXX_FLAGS += $(DGL_FLAGS) -Isrc # ---------------------------------------------------------------------------------------------------------------------------- diff --git a/source/modules/distrho/DistrhoUI.hpp b/source/modules/distrho/DistrhoUI.hpp index fd6357a1e..7429bdc28 100644 --- a/source/modules/distrho/DistrhoUI.hpp +++ b/source/modules/distrho/DistrhoUI.hpp @@ -175,11 +175,13 @@ protected: */ virtual void uiIdle() {} +#ifndef DGL_FILE_BROWSER_DISABLED /** File browser selected function. @see Window::fileBrowserSelected(const char*) */ virtual void uiFileBrowserSelected(const char* filename); +#endif /** OpenGL window reshape function, called when parent window is resized. diff --git a/source/modules/distrho/src/DistrhoUI.cpp b/source/modules/distrho/src/DistrhoUI.cpp index a4663090f..5500e394e 100644 --- a/source/modules/distrho/src/DistrhoUI.cpp +++ b/source/modules/distrho/src/DistrhoUI.cpp @@ -125,9 +125,11 @@ void UI::sampleRateChanged(double) {} /* ------------------------------------------------------------------------------------------------------------ * UI Callbacks (optional) */ +#ifndef DGL_FILE_BROWSER_DISABLED void UI::uiFileBrowserSelected(const char*) { } +#endif void UI::uiReshape(uint width, uint height) { diff --git a/source/modules/distrho/src/DistrhoUIInternal.hpp b/source/modules/distrho/src/DistrhoUIInternal.hpp index 5c41ece3b..7da7c0063 100644 --- a/source/modules/distrho/src/DistrhoUIInternal.hpp +++ b/source/modules/distrho/src/DistrhoUIInternal.hpp @@ -186,6 +186,7 @@ protected: fIsReady = true; } +#ifndef DGL_FILE_BROWSER_DISABLED // custom file-browser selected void fileBrowserSelected(const char* filename) override { @@ -193,6 +194,7 @@ protected: fUI->uiFileBrowserSelected(filename); } +#endif private: UI* const fUI; diff --git a/source/native-plugins/external/Makefile.mk b/source/native-plugins/external/Makefile.mk index 206274d0c..2920b2e1e 100644 --- a/source/native-plugins/external/Makefile.mk +++ b/source/native-plugins/external/Makefile.mk @@ -82,7 +82,7 @@ DGL_FLAGS = $(shell pkg-config --cflags gl x11) DGL_LIBS = $(shell pkg-config --libs gl x11) endif -DGL_FLAGS += -DDGL_NAMESPACE=CarlaDGL +DGL_FLAGS += -DDGL_NAMESPACE=CarlaDGL -DDGL_FILE_BROWSER_DISABLED endif # --------------------------------------------------------------------------------------------------------------------- @@ -98,7 +98,7 @@ endif DPF_FLAGS = -I$(CWDE)/modules/distrho ifeq ($(HAVE_DGL),true) -DPF_FLAGS += -I$(CWDE)/modules/dgl -DDGL_NAMESPACE=CarlaDGL +DPF_FLAGS += -I$(CWDE)/modules/dgl -DDGL_NAMESPACE=CarlaDGL -DDGL_FILE_BROWSER_DISABLED endif # ---------------------------------------------------------------------------------------------------------------------