diff --git a/dgl/src/pugl.cpp b/dgl/src/pugl.cpp index b33eeb96..0b61ae3b 100644 --- a/dgl/src/pugl.cpp +++ b/dgl/src/pugl.cpp @@ -102,12 +102,11 @@ #ifndef DGL_FILE_BROWSER_DISABLED # define FILE_BROWSER_DIALOG_DGL_NAMESPACE -# include "../FileBrowserDialog.hpp" -# ifdef DISTRHO_OS_MAC -# import "../../distrho/extra/FileBrowserDialogImpl.cpp" -# else -# include "../../distrho/extra/FileBrowserDialogImpl.cpp" -# endif +# define DGL_FILE_BROWSER_DIALOG_HPP_INCLUDED +START_NAMESPACE_DGL +# include "../../distrho/extra/FileBrowserDialogImpl.hpp" +END_NAMESPACE_DGL +# include "../../distrho/extra/FileBrowserDialogImpl.cpp" #endif #ifndef DISTRHO_OS_MAC diff --git a/distrho/DistrhoUI_macOS.mm b/distrho/DistrhoUI_macOS.mm index a554dba2..af0ce740 100644 --- a/distrho/DistrhoUI_macOS.mm +++ b/distrho/DistrhoUI_macOS.mm @@ -27,10 +27,12 @@ // A few utils declared in DistrhoUI.cpp but defined here because they uses Obj-C #if DISTRHO_UI_FILE_BROWSER +# define DISTRHO_FILE_BROWSER_DIALOG_HPP_INCLUDED # define FILE_BROWSER_DIALOG_DISTRHO_NAMESPACE -# include "extra/FileBrowserDialog.hpp" +START_NAMESPACE_DISTRHO +# include "extra/FileBrowserDialogImpl.hpp" +END_NAMESPACE_DISTRHO # import "extra/FileBrowserDialogImpl.cpp" -# undef FILE_BROWSER_DIALOG_DISTRHO_NAMESPACE #endif #if DISTRHO_PLUGIN_HAS_EXTERNAL_UI diff --git a/distrho/src/DistrhoPluginChecks.h b/distrho/src/DistrhoPluginChecks.h index d2df9f89..dd838b96 100644 --- a/distrho/src/DistrhoPluginChecks.h +++ b/distrho/src/DistrhoPluginChecks.h @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2019 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 diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp index 87788eb1..20e084f7 100644 --- a/distrho/src/DistrhoUI.cpp +++ b/distrho/src/DistrhoUI.cpp @@ -17,6 +17,12 @@ #include "src/DistrhoPluginChecks.h" #include "src/DistrhoDefines.h" +#ifdef DISTRHO_PROPER_CPP11_SUPPORT +# include +#else +# include +#endif + #if DISTRHO_UI_FILE_BROWSER && !defined(DISTRHO_OS_MAC) # define DISTRHO_PUGL_NAMESPACE_MACRO_HELPER(NS, SEP, FUNCTION) NS ## SEP ## FUNCTION # define DISTRHO_PUGL_NAMESPACE_MACRO(NS, FUNCTION) DISTRHO_PUGL_NAMESPACE_MACRO_HELPER(NS, _, FUNCTION) @@ -35,8 +41,12 @@ # define x_fib_save_recent DISTRHO_PUGL_NAMESPACE_MACRO(plugin, x_fib_save_recent) # define x_fib_show DISTRHO_PUGL_NAMESPACE_MACRO(plugin, x_fib_show) # define x_fib_status DISTRHO_PUGL_NAMESPACE_MACRO(plugin, x_fib_status) +# define DISTRHO_FILE_BROWSER_DIALOG_HPP_INCLUDED # define FILE_BROWSER_DIALOG_DISTRHO_NAMESPACE -# include "../extra/FileBrowserDialog.hpp" +START_NAMESPACE_DISTRHO +# include "../extra/FileBrowserDialogImpl.hpp" +END_NAMESPACE_DISTRHO +# include "../extra/FileBrowserDialogImpl.hpp" # include "../extra/FileBrowserDialogImpl.cpp" #endif