Browse Source

Fix compat with old macOS

pull/321/head
falkTX 3 years ago
parent
commit
7d4e299e43
2 changed files with 7 additions and 2 deletions
  1. +5
    -0
      distrho/extra/FileBrowserDialog.cpp
  2. +2
    -2
      distrho/src/DistrhoDefines.h

+ 5
- 0
distrho/extra/FileBrowserDialog.cpp View File

@@ -303,6 +303,10 @@ FileBrowserHandle fileBrowserCreate(const bool isEmbed,
ScopedPointer<FileBrowserData> handle(new FileBrowserData(options.saving));

#ifdef DISTRHO_OS_MAC
# if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_8
// unsupported
return nullptr;
# else
NSSavePanel* const nsBasePanel = handle->nsBasePanel;
DISTRHO_SAFE_ASSERT_RETURN(nsBasePanel != nullptr, nullptr);

@@ -349,6 +353,7 @@ FileBrowserHandle fileBrowserCreate(const bool isEmbed,
}
}];
});
# endif
#endif

#ifdef DISTRHO_OS_WINDOWS


+ 2
- 2
distrho/src/DistrhoDefines.h View File

@@ -90,9 +90,9 @@
#endif

/* Define DISTRHO_DEPRECATED_BY */
#if defined(__clang__) && defined(DISTRHO_PROPER_CPP11_SUPPORT)
#if defined(__clang__) && (__clang_major__ * 100 + __clang_minor__) >= 502
# define DISTRHO_DEPRECATED_BY(other) __attribute__((deprecated("", other)))
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 480
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408
# define DISTRHO_DEPRECATED_BY(other) __attribute__((deprecated("Use " other)))
#else
# define DISTRHO_DEPRECATED_BY(other) DISTRHO_DEPRECATED


Loading…
Cancel
Save