Browse Source

Fix build with -Werror=undef

Signed-off-by: falkTX <falktx@falktx.com>
pull/448/head
falkTX 1 year ago
parent
commit
4772a3846a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 18 additions and 7 deletions
  1. +11
    -0
      distrho/src/DistrhoPluginChecks.h
  2. +3
    -3
      distrho/src/DistrhoPluginLV2export.cpp
  3. +4
    -4
      distrho/src/DistrhoPluginVST2.cpp

+ 11
- 0
distrho/src/DistrhoPluginChecks.h View File

@@ -198,6 +198,17 @@
# error DISTRHO_UI_DEFAULT_HEIGHT is defined but DISTRHO_UI_DEFAULT_WIDTH is not
#endif

// -----------------------------------------------------------------------
// Other UI defaults

#ifndef DISTRHO_UI_USE_CAIRO
# define DISTRHO_UI_USE_CAIRO 0
#endif

#ifndef DISTRHO_UI_USE_CUSTOM
# define DISTRHO_UI_USE_CUSTOM 0
#endif

// -----------------------------------------------------------------------
// Prevent users from messing about with DPF internals



+ 3
- 3
distrho/src/DistrhoPluginLV2export.cpp View File

@@ -75,11 +75,11 @@
#endif

#if DISTRHO_PLUGIN_HAS_EMBED_UI
# if DISTRHO_OS_HAIKU
# if defined(DISTRHO_OS_HAIKU)
# define DISTRHO_LV2_UI_TYPE "BeUI"
# elif DISTRHO_OS_MAC
# elif defined(DISTRHO_OS_MAC)
# define DISTRHO_LV2_UI_TYPE "CocoaUI"
# elif DISTRHO_OS_WINDOWS
# elif defined(DISTRHO_OS_WINDOWS)
# define DISTRHO_LV2_UI_TYPE "WindowsUI"
# else
# define DISTRHO_LV2_UI_TYPE "X11UI"


+ 4
- 4
distrho/src/DistrhoPluginVST2.cpp View File

@@ -429,7 +429,7 @@ public:
memset(parameterChecks, 0, sizeof(bool)*parameterCount);
}

#if DISTRHO_OS_MAC
#ifdef DISTRHO_OS_MAC
#ifdef __LP64__
fUsingNsView = true;
#else
@@ -627,7 +627,7 @@ public:
delete fVstUI; // for hosts which don't pair create/destroy calls (Minihost Modular)
fVstUI = nullptr;

#if DISTRHO_OS_MAC
#ifdef DISTRHO_OS_MAC
if (! fUsingNsView)
{
d_stderr("Host doesn't support hasCockosViewAsConfig, cannot use UI");
@@ -917,7 +917,7 @@ public:
case VST_EFFECT_OPCODE_SUPPORTS:
if (const char* const canDo = (const char*)ptr)
{
#if DISTRHO_OS_MAC && DISTRHO_PLUGIN_HAS_UI
#if defined(DISTRHO_OS_MAC) && DISTRHO_PLUGIN_HAS_UI
if (std::strcmp(canDo, "hasCockosViewAsConfig") == 0)
{
fUsingNsView = true;
@@ -1140,7 +1140,7 @@ private:
UIVst* fVstUI;
vst_rect fVstRect;
float fLastScaleFactor;
#if DISTRHO_OS_MAC
#ifdef DISTRHO_OS_MAC
bool fUsingNsView;
#endif
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT


Loading…
Cancel
Save