Skip to content

Commit

Permalink
Fix build with -Werror=undef
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jan 23, 2024
1 parent e35376a commit 4772a38
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
11 changes: 11 additions & 0 deletions distrho/src/DistrhoPluginChecks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions distrho/src/DistrhoPluginLV2export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions distrho/src/DistrhoPluginVST2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class PluginVst : public ParameterAndNotesHelper
memset(parameterChecks, 0, sizeof(bool)*parameterCount);
}

#if DISTRHO_OS_MAC
#ifdef DISTRHO_OS_MAC
#ifdef __LP64__
fUsingNsView = true;
#else
Expand Down Expand Up @@ -627,7 +627,7 @@ class PluginVst : public ParameterAndNotesHelper
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");
Expand Down Expand Up @@ -917,7 +917,7 @@ class PluginVst : public ParameterAndNotesHelper
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;
Expand Down Expand Up @@ -1140,7 +1140,7 @@ class PluginVst : public ParameterAndNotesHelper
UIVst* fVstUI;
vst_rect fVstRect;
float fLastScaleFactor;
#if DISTRHO_OS_MAC
#ifdef DISTRHO_OS_MAC
bool fUsingNsView;
#endif
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
Expand Down

0 comments on commit 4772a38

Please sign in to comment.