From c8d968a230e509c3b886e4482c17de8e4f466f35 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 1 Jan 2018 12:43:22 +0100 Subject: [PATCH] Fix build with custom DGL namespace, use it for OSX class names --- dgl/src/pugl/pugl_osx.m | 3 +++ distrho/DistrhoUI.hpp | 6 +++--- distrho/src/DistrhoUIInternal.hpp | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dgl/src/pugl/pugl_osx.m b/dgl/src/pugl/pugl_osx.m index 82985fbe..b4d64be2 100644 --- a/dgl/src/pugl/pugl_osx.m +++ b/dgl/src/pugl/pugl_osx.m @@ -24,6 +24,9 @@ #include "pugl_internal.h" +#define PuglWindow PuglWindow ## DGL_NAMESPACE +#define PuglOpenGLView PuglOpenGLView ## DGL_NAMESPACE + @interface PuglWindow : NSWindow { @public diff --git a/distrho/DistrhoUI.hpp b/distrho/DistrhoUI.hpp index 0e8cb1ac..7429bdc2 100644 --- a/distrho/DistrhoUI.hpp +++ b/distrho/DistrhoUI.hpp @@ -25,10 +25,10 @@ typedef DISTRHO_NAMESPACE::ExternalWindow UIWidget; #elif DISTRHO_UI_USE_NANOVG # include "../dgl/NanoVG.hpp" -typedef DGL::NanoWidget UIWidget; +typedef DGL_NAMESPACE::NanoWidget UIWidget; #else # include "../dgl/Widget.hpp" -typedef DGL::Widget UIWidget; +typedef DGL_NAMESPACE::Widget UIWidget; #endif START_NAMESPACE_DISTRHO @@ -214,7 +214,7 @@ private: void setAbsoluteX(int) const noexcept {} void setAbsoluteY(int) const noexcept {} void setAbsolutePos(int, int) const noexcept {} - void setAbsolutePos(const DGL::Point&) const noexcept {} + void setAbsolutePos(const DGL_NAMESPACE::Point&) const noexcept {} #endif DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UI) diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp index 3bf459fa..b2dd7e67 100644 --- a/distrho/src/DistrhoUIInternal.hpp +++ b/distrho/src/DistrhoUIInternal.hpp @@ -22,9 +22,9 @@ #ifdef HAVE_DGL # include "../../dgl/Application.hpp" # include "../../dgl/Window.hpp" -using DGL::Application; -using DGL::IdleCallback; -using DGL::Window; +using DGL_NAMESPACE::Application; +using DGL_NAMESPACE::IdleCallback; +using DGL_NAMESPACE::Window; #endif START_NAMESPACE_DISTRHO