Browse Source

macOS: Remove macOS 10.14 preprocessor checks

The current minimum-supported Xcode (10.1) includes the macOS 10.14.1
SDK, so APIs from macOS 10.14 will always be available.
v7.0.9
reuk 2 years ago
parent
commit
41ef5b7fd5
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
4 changed files with 3 additions and 11 deletions
  1. +1
    -1
      modules/juce_core/native/juce_BasicNativeHeaders.h
  2. +1
    -3
      modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm
  3. +0
    -6
      modules/juce_gui_basics/native/juce_mac_MainMenu.mm
  4. +1
    -1
      modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm

+ 1
- 1
modules/juce_core/native/juce_BasicNativeHeaders.h View File

@@ -41,7 +41,7 @@
#import <MobileCoreServices/MobileCoreServices.h>
#include <sys/fcntl.h>
#else
#if JUCE_MODULE_AVAILABLE_juce_opengl && defined (MAC_OS_X_VERSION_10_14) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
#if JUCE_MODULE_AVAILABLE_juce_opengl
#define GL_SILENCE_DEPRECATION 1
#endif


+ 1
- 3
modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm View File

@@ -41,12 +41,10 @@ public:
auto numComponents = (size_t) lineStride * (size_t) jmax (1, height);
# if JUCE_MAC && defined (MAC_OS_X_VERSION_10_14) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
// This version of the SDK intermittently requires a bit of extra space
// SDK version 10.14+ intermittently requires a bit of extra space
// at the end of the image data. This feels like something has gone
// wrong in Apple's code.
numComponents += (size_t) lineStride;
#endif
imageData->data.allocate (numComponents, clearImage);


+ 0
- 6
modules/juce_gui_basics/native/juce_mac_MainMenu.mm View File

@@ -455,10 +455,7 @@ private:
{
addMethod (menuItemInvokedSelector, menuItemInvoked);
addMethod (@selector (validateMenuItem:), validateMenuItem);
#if defined (MAC_OS_X_VERSION_10_14)
addProtocol (@protocol (NSMenuItemValidation));
#endif
registerClass();
}
@@ -552,10 +549,7 @@ private:
addMethod (@selector (validateMenuItem:), validateMenuItem);
addProtocol (@protocol (NSMenuDelegate));
#if defined (MAC_OS_X_VERSION_10_14)
addProtocol (@protocol (NSMenuItemValidation));
#endif
registerClass();
}


+ 1
- 1
modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm View File

@@ -375,7 +375,7 @@ private:
auto flags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles
| ([parameters allowsMultipleSelection] ? FileBrowserComponent::canSelectMultipleItems : 0);
#if (defined (MAC_OS_X_VERSION_10_14) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14)
#if JUCE_MAC
if (@available (macOS 10.14, *))
{
if ([parameters allowsDirectories])


Loading…
Cancel
Save