Browse Source

Make sure to always include+build the correct file browser file

Signed-off-by: falkTX <falktx@falktx.com>
pull/321/head
falkTX 2 years ago
parent
commit
1f3fb01339
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 21 additions and 10 deletions
  1. +5
    -6
      dgl/src/pugl.cpp
  2. +4
    -2
      distrho/DistrhoUI_macOS.mm
  3. +1
    -1
      distrho/src/DistrhoPluginChecks.h
  4. +11
    -1
      distrho/src/DistrhoUI.cpp

+ 5
- 6
dgl/src/pugl.cpp View File

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


+ 4
- 2
distrho/DistrhoUI_macOS.mm View File

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


+ 1
- 1
distrho/src/DistrhoPluginChecks.h View File

@@ -1,6 +1,6 @@
/*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
*
* 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


+ 11
- 1
distrho/src/DistrhoUI.cpp View File

@@ -17,6 +17,12 @@
#include "src/DistrhoPluginChecks.h"
#include "src/DistrhoDefines.h"

#ifdef DISTRHO_PROPER_CPP11_SUPPORT
# include <cstdint>
#else
# include <stdint.h>
#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



Loading…
Cancel
Save