Browse Source

Fix crash when opening internal DPF plugins after namespace change

tags/1.9.8
falkTX 8 years ago
parent
commit
a57949d2ab
5 changed files with 9 additions and 3 deletions
  1. +1
    -1
      source/modules/dgl/Makefile
  2. +2
    -0
      source/modules/distrho/DistrhoUI.hpp
  3. +2
    -0
      source/modules/distrho/src/DistrhoUI.cpp
  4. +2
    -0
      source/modules/distrho/src/DistrhoUIInternal.hpp
  5. +2
    -2
      source/native-plugins/external/Makefile.mk

+ 1
- 1
source/modules/dgl/Makefile View File

@@ -10,7 +10,7 @@ include ../Makefile.mk

# ----------------------------------------------------------------------------------------------------------------------------

BUILD_CXX_FLAGS += $(DGL_FLAGS) -DDGL_FILE_BROWSER_DISABLED -Isrc
BUILD_CXX_FLAGS += $(DGL_FLAGS) -Isrc

# ----------------------------------------------------------------------------------------------------------------------------



+ 2
- 0
source/modules/distrho/DistrhoUI.hpp View File

@@ -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.


+ 2
- 0
source/modules/distrho/src/DistrhoUI.cpp View File

@@ -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)
{


+ 2
- 0
source/modules/distrho/src/DistrhoUIInternal.hpp View File

@@ -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;


+ 2
- 2
source/native-plugins/external/Makefile.mk View File

@@ -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

# ---------------------------------------------------------------------------------------------------------------------


Loading…
Cancel
Save