mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Platform: Remove build-time Apple SDK availability checks
This commit is contained in:
parent
5c1b75cab7
commit
b89553ae2c
10 changed files with 12 additions and 119 deletions
|
|
@ -90,16 +90,12 @@ struct CoreAudioLayouts
|
|||
List { kAudioChannelLayoutTag_Hexagonal, { left, right, leftSurroundRear, rightSurroundRear, centre, centreSurround } },
|
||||
List { kAudioChannelLayoutTag_Octagonal, { left, right, leftSurround, rightSurround, centre, centreSurround, wideLeft, wideRight } },
|
||||
|
||||
#if defined (MAC_OS_VERSION_11_0)
|
||||
List { kAudioChannelLayoutTag_Atmos_5_1_4, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, topRearLeft, topRearRight } },
|
||||
List { kAudioChannelLayoutTag_Atmos_7_1_2, { left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, topSideLeft, topSideRight } },
|
||||
#endif
|
||||
|
||||
#if defined (MAC_OS_X_VERSION_10_15)
|
||||
List { kAudioChannelLayoutTag_Atmos_5_1_2, { left, right, centre, LFE, leftSurround, rightSurround, topSideLeft, topSideRight } },
|
||||
List { kAudioChannelLayoutTag_Atmos_7_1_4, { left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, topFrontLeft, topFrontRight, topRearLeft, topRearRight } },
|
||||
List { kAudioChannelLayoutTag_Atmos_9_1_6, { left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topSideLeft, topSideRight, topRearLeft, topRearRight } },
|
||||
#endif
|
||||
|
||||
// More uncommon layouts...
|
||||
List { kAudioChannelLayoutTag_StereoHeadphones, { left, right } },
|
||||
|
|
|
|||
|
|
@ -63,20 +63,12 @@ namespace CoreMidiHelpers
|
|||
onlyOld
|
||||
};
|
||||
|
||||
#if (defined (MAC_OS_VERSION_11_0) || defined (__IPHONE_14_0))
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_14_0)
|
||||
#define JUCE_HAS_NEW_COREMIDI_API 1
|
||||
#define JUCE_HAS_OLD_COREMIDI_API 0
|
||||
constexpr auto implementationStrategy = ImplementationStrategy::onlyNew;
|
||||
#else
|
||||
#define JUCE_HAS_NEW_COREMIDI_API 1
|
||||
#define JUCE_HAS_OLD_COREMIDI_API 1
|
||||
constexpr auto implementationStrategy = ImplementationStrategy::both;
|
||||
#endif
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_14_0)
|
||||
#define JUCE_HAS_OLD_COREMIDI_API 0
|
||||
constexpr auto implementationStrategy = ImplementationStrategy::onlyNew;
|
||||
#else
|
||||
#define JUCE_HAS_NEW_COREMIDI_API 0
|
||||
#define JUCE_HAS_OLD_COREMIDI_API 1
|
||||
constexpr auto implementationStrategy = ImplementationStrategy::onlyOld;
|
||||
constexpr auto implementationStrategy = ImplementationStrategy::both;
|
||||
#endif
|
||||
|
||||
struct SenderBase
|
||||
|
|
@ -90,7 +82,6 @@ namespace CoreMidiHelpers
|
|||
template <ImplementationStrategy>
|
||||
struct Sender;
|
||||
|
||||
#if JUCE_HAS_NEW_COREMIDI_API
|
||||
template <>
|
||||
struct API_AVAILABLE (macos (11.0), ios (14.0)) Sender<ImplementationStrategy::onlyNew> final : public SenderBase
|
||||
{
|
||||
|
|
@ -175,7 +166,6 @@ namespace CoreMidiHelpers
|
|||
send();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#if JUCE_HAS_OLD_COREMIDI_API
|
||||
template <>
|
||||
|
|
@ -264,7 +254,7 @@ namespace CoreMidiHelpers
|
|||
};
|
||||
#endif
|
||||
|
||||
#if JUCE_HAS_NEW_COREMIDI_API && JUCE_HAS_OLD_COREMIDI_API
|
||||
#if JUCE_HAS_OLD_COREMIDI_API
|
||||
template <>
|
||||
struct Sender<ImplementationStrategy::both>
|
||||
{
|
||||
|
|
@ -633,7 +623,6 @@ namespace CoreMidiHelpers
|
|||
template <ImplementationStrategy>
|
||||
struct Receiver;
|
||||
|
||||
#if JUCE_HAS_NEW_COREMIDI_API
|
||||
template <>
|
||||
struct Receiver<ImplementationStrategy::onlyNew>
|
||||
{
|
||||
|
|
@ -665,7 +654,6 @@ namespace CoreMidiHelpers
|
|||
private:
|
||||
std::unique_ptr<ump::U32InputHandler> u32InputHandler;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if JUCE_HAS_OLD_COREMIDI_API
|
||||
template <>
|
||||
|
|
@ -697,7 +685,7 @@ namespace CoreMidiHelpers
|
|||
};
|
||||
#endif
|
||||
|
||||
#if JUCE_HAS_NEW_COREMIDI_API && JUCE_HAS_OLD_COREMIDI_API
|
||||
#if JUCE_HAS_OLD_COREMIDI_API
|
||||
template <>
|
||||
struct Receiver<ImplementationStrategy::both>
|
||||
{
|
||||
|
|
@ -808,7 +796,6 @@ namespace CoreMidiHelpers
|
|||
template <ImplementationStrategy>
|
||||
struct CreatorFunctions;
|
||||
|
||||
#if JUCE_HAS_NEW_COREMIDI_API
|
||||
template <>
|
||||
struct API_AVAILABLE (macos (11.0), ios (14.0)) CreatorFunctions<ImplementationStrategy::onlyNew>
|
||||
{
|
||||
|
|
@ -872,7 +859,6 @@ namespace CoreMidiHelpers
|
|||
static_cast<MidiPortAndCallback*> (readProcRefCon)->handlePackets (list);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#if JUCE_HAS_OLD_COREMIDI_API
|
||||
template <>
|
||||
|
|
@ -917,7 +903,7 @@ namespace CoreMidiHelpers
|
|||
};
|
||||
#endif
|
||||
|
||||
#if JUCE_HAS_NEW_COREMIDI_API && JUCE_HAS_OLD_COREMIDI_API
|
||||
#if JUCE_HAS_OLD_COREMIDI_API
|
||||
template <>
|
||||
struct CreatorFunctions<ImplementationStrategy::both>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -72,30 +72,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wambiguous-reversed-operator",
|
|||
#define verify_noerr(errorCode) __Verify_noErr(errorCode)
|
||||
#endif
|
||||
|
||||
#if ! defined (MAC_OS_VERSION_11_0) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_11_0
|
||||
// These constants are only defined in the macOS 11+ SDKs
|
||||
|
||||
enum MIDICVStatus : unsigned int
|
||||
{
|
||||
kMIDICVStatusNoteOff = 0x8,
|
||||
kMIDICVStatusNoteOn = 0x9,
|
||||
kMIDICVStatusPolyPressure = 0xA,
|
||||
kMIDICVStatusControlChange = 0xB,
|
||||
kMIDICVStatusProgramChange = 0xC,
|
||||
kMIDICVStatusChannelPressure = 0xD,
|
||||
kMIDICVStatusPitchBend = 0xE,
|
||||
kMIDICVStatusRegisteredPNC = 0x0,
|
||||
kMIDICVStatusAssignablePNC = 0x1,
|
||||
kMIDICVStatusRegisteredControl = 0x2,
|
||||
kMIDICVStatusAssignableControl = 0x3,
|
||||
kMIDICVStatusRelRegisteredControl = 0x4,
|
||||
kMIDICVStatusRelAssignableControl = 0x5,
|
||||
kMIDICVStatusPerNotePitchBend = 0x6,
|
||||
kMIDICVStatusPerNoteMgmt = 0xF
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#include <juce_audio_plugin_client/AU/AudioUnitSDK/AUBase.cpp>
|
||||
#include <juce_audio_plugin_client/AU/AudioUnitSDK/AUBuffer.cpp>
|
||||
#include <juce_audio_plugin_client/AU/AudioUnitSDK/AUBufferAllocator.cpp>
|
||||
|
|
|
|||
|
|
@ -37,10 +37,6 @@
|
|||
|
||||
#if JucePlugin_Build_AUv3
|
||||
|
||||
#if JUCE_MAC && ! (defined (MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11)
|
||||
#error AUv3 needs Deployment Target OS X 10.11 or higher to compile
|
||||
#endif
|
||||
|
||||
#ifndef __OBJC2__
|
||||
#error AUv3 needs Objective-C 2 support (compile with 64-bit)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -418,7 +418,6 @@ bool JUCE_CALLTYPE Process::openDocument (const String& fileName, [[maybe_unused
|
|||
for (int i = 0; i < params.size(); ++i)
|
||||
[paramArray addObject: juceStringToNS (params[i])];
|
||||
|
||||
#if defined (MAC_OS_X_VERSION_10_15) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15
|
||||
if (@available (macOS 10.15, *))
|
||||
{
|
||||
auto config = [NSWorkspaceOpenConfiguration configuration];
|
||||
|
|
@ -431,7 +430,6 @@ bool JUCE_CALLTYPE Process::openDocument (const String& fileName, [[maybe_unused
|
|||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
|
||||
|
|
|
|||
|
|
@ -161,10 +161,10 @@
|
|||
#endif
|
||||
|
||||
#if JUCE_MAC
|
||||
#if ! defined (MAC_OS_X_VERSION_10_14)
|
||||
#error "The 10.14 SDK (Xcode 10.1+) is required to build JUCE apps. You can create apps that run on macOS 10.9+ by changing the deployment target."
|
||||
#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9
|
||||
#error "Building for OSX 10.8 and earlier is no longer supported!"
|
||||
#if ! defined (MAC_OS_VERSION_11_1)
|
||||
#error "The macOS 11.1 SDK (Xcode 12.4+) is required to build JUCE apps. You can create apps that run on macOS 10.11+ by changing the deployment target."
|
||||
#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11
|
||||
#error "Building for OSX 10.10 and earlier is no longer supported!"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1909,14 +1909,10 @@ private:
|
|||
case NSEventTypeBeginGesture:
|
||||
case NSEventTypeEndGesture:
|
||||
case NSEventTypeQuickLook:
|
||||
#if JUCE_64BIT
|
||||
case NSEventTypeSmartMagnify:
|
||||
case NSEventTypePressure:
|
||||
case NSEventTypeDirectTouch:
|
||||
#endif
|
||||
#if defined (MAC_OS_X_VERSION_10_15) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15
|
||||
case NSEventTypeChangeMode:
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,18 +37,6 @@
|
|||
#undef JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS
|
||||
#endif
|
||||
|
||||
#if defined (__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
|
||||
#define JUCE_HAS_IOS_POINTER_SUPPORT 1
|
||||
#else
|
||||
#define JUCE_HAS_IOS_POINTER_SUPPORT 0
|
||||
#endif
|
||||
|
||||
#if defined (__IPHONE_13_4) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_4
|
||||
#define JUCE_HAS_IOS_HARDWARE_KEYBOARD_SUPPORT 1
|
||||
#else
|
||||
#define JUCE_HAS_IOS_HARDWARE_KEYBOARD_SUPPORT 0
|
||||
#endif
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
|
|
@ -120,14 +108,12 @@ static UIInterfaceOrientation getWindowOrientation()
|
|||
{
|
||||
UIApplication* sharedApplication = [UIApplication sharedApplication];
|
||||
|
||||
#if defined (__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
|
||||
if (@available (iOS 13.0, *))
|
||||
{
|
||||
for (UIScene* scene in [sharedApplication connectedScenes])
|
||||
if ([scene isKindOfClass: [UIWindowScene class]])
|
||||
return [(UIWindowScene*) scene interfaceOrientation];
|
||||
}
|
||||
#endif
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
return [sharedApplication statusBarOrientation];
|
||||
|
|
@ -335,10 +321,8 @@ struct CADisplayLinkDeleter
|
|||
- (void) touchesEnded: (NSSet*) touches withEvent: (UIEvent*) event;
|
||||
- (void) touchesCancelled: (NSSet*) touches withEvent: (UIEvent*) event;
|
||||
|
||||
#if JUCE_HAS_IOS_POINTER_SUPPORT
|
||||
- (void) onHover: (UIHoverGestureRecognizer*) gesture API_AVAILABLE (ios (13.0));
|
||||
- (void) onScroll: (UIPanGestureRecognizer*) gesture;
|
||||
#endif
|
||||
|
||||
- (BOOL) becomeFirstResponder;
|
||||
- (BOOL) resignFirstResponder;
|
||||
|
|
@ -454,10 +438,8 @@ public:
|
|||
|
||||
void handleTouches (UIEvent*, MouseEventFlags);
|
||||
|
||||
#if JUCE_HAS_IOS_POINTER_SUPPORT
|
||||
API_AVAILABLE (ios (13.0)) void onHover (UIHoverGestureRecognizer*);
|
||||
void onScroll (UIPanGestureRecognizer*);
|
||||
#endif
|
||||
|
||||
Range<int> getMarkedTextRange() const
|
||||
{
|
||||
|
|
@ -661,7 +643,6 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches;
|
|||
|
||||
- (UIStatusBarStyle) preferredStatusBarStyle
|
||||
{
|
||||
#if defined (__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
|
||||
if (@available (iOS 13.0, *))
|
||||
{
|
||||
if (auto* peer = getViewPeer (self))
|
||||
|
|
@ -677,7 +658,6 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches;
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return UIStatusBarStyleDefault;
|
||||
}
|
||||
|
|
@ -747,7 +727,6 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches;
|
|||
|
||||
[self addSubview: owner->hiddenTextInput.get()];
|
||||
|
||||
#if JUCE_HAS_IOS_POINTER_SUPPORT
|
||||
if (@available (iOS 13.4, *))
|
||||
{
|
||||
auto hoverRecognizer = [[[UIHoverGestureRecognizer alloc] initWithTarget: self action: @selector (onHover:)] autorelease];
|
||||
|
|
@ -762,7 +741,6 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches;
|
|||
[panRecognizer setMaximumNumberOfTouches: 0];
|
||||
[self addGestureRecognizer: panRecognizer];
|
||||
}
|
||||
#endif
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
@ -867,7 +845,6 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches;
|
|||
[self touchesEnded: touches withEvent: event];
|
||||
}
|
||||
|
||||
#if JUCE_HAS_IOS_POINTER_SUPPORT
|
||||
- (void) onHover: (UIHoverGestureRecognizer*) gesture
|
||||
{
|
||||
if (owner != nullptr)
|
||||
|
|
@ -879,7 +856,6 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches;
|
|||
if (owner != nullptr)
|
||||
owner->onScroll (gesture);
|
||||
}
|
||||
#endif
|
||||
|
||||
static std::optional<int> getKeyCodeForSpecialCharacterString (StringRef characters)
|
||||
{
|
||||
|
|
@ -892,14 +868,10 @@ static std::optional<int> getKeyCodeForSpecialCharacterString (StringRef charact
|
|||
{ nsStringToJuce (UIKeyInputLeftArrow), KeyPress::leftKey },
|
||||
{ nsStringToJuce (UIKeyInputRightArrow), KeyPress::rightKey },
|
||||
{ nsStringToJuce (UIKeyInputEscape), KeyPress::escapeKey },
|
||||
#if JUCE_HAS_IOS_HARDWARE_KEYBOARD_SUPPORT
|
||||
// These symbols are available on iOS 8, but only declared in the headers for iOS 13.4+
|
||||
{ nsStringToJuce (UIKeyInputPageUp), KeyPress::pageUpKey },
|
||||
{ nsStringToJuce (UIKeyInputPageDown), KeyPress::pageDownKey },
|
||||
#endif
|
||||
};
|
||||
|
||||
#if JUCE_HAS_IOS_HARDWARE_KEYBOARD_SUPPORT
|
||||
if (@available (iOS 13.4, *))
|
||||
{
|
||||
result.insert ({ { nsStringToJuce (UIKeyInputHome), KeyPress::homeKey },
|
||||
|
|
@ -917,7 +889,6 @@ static std::optional<int> getKeyCodeForSpecialCharacterString (StringRef charact
|
|||
{ nsStringToJuce (UIKeyInputF11), KeyPress::F11Key },
|
||||
{ nsStringToJuce (UIKeyInputF12), KeyPress::F12Key } });
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (__IPHONE_15_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0
|
||||
if (@available (iOS 15.0, *))
|
||||
|
|
@ -943,7 +914,6 @@ static int getKeyCodeForCharacters (NSString* characters)
|
|||
return getKeyCodeForCharacters (nsStringToJuce (characters));
|
||||
}
|
||||
|
||||
#if JUCE_HAS_IOS_HARDWARE_KEYBOARD_SUPPORT
|
||||
static void updateModifiers (const UIKeyModifierFlags flags)
|
||||
{
|
||||
const auto convert = [&flags] (UIKeyModifierFlags f, int result) { return (flags & f) != 0 ? result : 0; };
|
||||
|
|
@ -1051,7 +1021,6 @@ static bool doKeysUp (UIViewComponentPeer* owner, NSSet<UIPress*>* presses, UIPr
|
|||
if (! doKeysUp (owner, presses, event))
|
||||
[super pressesCancelled: presses withEvent: event];
|
||||
}
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
- (BOOL) becomeFirstResponder
|
||||
|
|
@ -1720,13 +1689,9 @@ namespace juce
|
|||
|
||||
bool KeyPress::isKeyCurrentlyDown (int keyCode)
|
||||
{
|
||||
#if JUCE_HAS_IOS_HARDWARE_KEYBOARD_SUPPORT
|
||||
return iOSGlobals::keysCurrentlyDown.isDown (keyCode)
|
||||
|| ('A' <= keyCode && keyCode <= 'Z' && iOSGlobals::keysCurrentlyDown.isDown ((int) CharacterFunctions::toLowerCase ((juce_wchar) keyCode)))
|
||||
|| ('a' <= keyCode && keyCode <= 'z' && iOSGlobals::keysCurrentlyDown.isDown ((int) CharacterFunctions::toUpperCase ((juce_wchar) keyCode)));
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Point<float> juce_lastMousePos;
|
||||
|
|
@ -1804,10 +1769,8 @@ UIViewComponentPeer::~UIViewComponentPeer()
|
|||
{
|
||||
[((JuceUIWindow*) window) setOwner: nil];
|
||||
|
||||
#if defined (__IPHONE_13_0)
|
||||
if (@available (iOS 13.0, *))
|
||||
window.windowScene = nil;
|
||||
#endif
|
||||
|
||||
[window release];
|
||||
}
|
||||
|
|
@ -2012,12 +1975,10 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, MouseEventFlags mouseEv
|
|||
if (event == nullptr)
|
||||
return;
|
||||
|
||||
#if JUCE_HAS_IOS_HARDWARE_KEYBOARD_SUPPORT
|
||||
if (@available (iOS 13.4, *))
|
||||
{
|
||||
updateModifiers ([event modifierFlags]);
|
||||
}
|
||||
#endif
|
||||
|
||||
NSArray* touches = [[event touchesForView: view] allObjects];
|
||||
|
||||
|
|
@ -2096,7 +2057,6 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, MouseEventFlags mouseEv
|
|||
}
|
||||
}
|
||||
|
||||
#if JUCE_HAS_IOS_POINTER_SUPPORT
|
||||
void UIViewComponentPeer::onHover (UIHoverGestureRecognizer* gesture)
|
||||
{
|
||||
auto pos = convertToPointFloat ([gesture locationInView: view]);
|
||||
|
|
@ -2129,7 +2089,6 @@ void UIViewComponentPeer::onScroll (UIPanGestureRecognizer* gesture)
|
|||
UIViewComponentPeer::getMouseTime ([[NSProcessInfo processInfo] systemUptime]),
|
||||
details);
|
||||
}
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
void UIViewComponentPeer::viewFocusGain()
|
||||
|
|
|
|||
|
|
@ -37,11 +37,7 @@ namespace juce
|
|||
|
||||
#if JUCE_WEB_BROWSER || DOXYGEN
|
||||
|
||||
#if (JUCE_MAC && (defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_13))) \
|
||||
|| (JUCE_IOS && (defined (__IPHONE_11_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_11_0))) \
|
||||
|| (JUCE_WINDOWS && JUCE_USE_WIN_WEBVIEW2) \
|
||||
|| JUCE_ANDROID \
|
||||
|| JUCE_LINUX
|
||||
#if JUCE_MAC || JUCE_IOS || (JUCE_WINDOWS && JUCE_USE_WIN_WEBVIEW2) || JUCE_ANDROID || JUCE_LINUX
|
||||
#define JUCE_WEB_BROWSER_RESOURCE_PROVIDER_AVAILABLE 1
|
||||
#else
|
||||
#define JUCE_WEB_BROWSER_RESOURCE_PROVIDER_AVAILABLE 0
|
||||
|
|
|
|||
|
|
@ -32,10 +32,6 @@
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
#if defined (MAC_OS_X_VERSION_10_15) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15
|
||||
#define JUCE_USE_NEW_CAMERA_API 1
|
||||
#endif
|
||||
|
||||
struct CameraDevice::Pimpl
|
||||
{
|
||||
Pimpl (CameraDevice& ownerToUse, const String& deviceNameToUse, int /*index*/,
|
||||
|
|
@ -47,10 +43,8 @@ struct CameraDevice::Pimpl
|
|||
{
|
||||
imageOutput = []() -> std::unique_ptr<ImageOutputBase>
|
||||
{
|
||||
#if JUCE_USE_NEW_CAMERA_API
|
||||
if (@available (macOS 10.15, *))
|
||||
return std::make_unique<PostCatalinaPhotoOutput>();
|
||||
#endif
|
||||
|
||||
return std::make_unique<PreCatalinaStillImageOutput>();
|
||||
}();
|
||||
|
|
@ -152,7 +146,6 @@ struct CameraDevice::Pimpl
|
|||
|
||||
static NSArray* getCaptureDevices()
|
||||
{
|
||||
#if JUCE_USE_NEW_CAMERA_API
|
||||
if (@available (macOS 10.15, *))
|
||||
{
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
|
|
@ -165,7 +158,6 @@ struct CameraDevice::Pimpl
|
|||
|
||||
return [discovery devices];
|
||||
}
|
||||
#endif
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
return [AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo];
|
||||
|
|
@ -255,7 +247,6 @@ private:
|
|||
virtual void triggerImageCapture (Pimpl& p) = 0;
|
||||
};
|
||||
|
||||
#if JUCE_USE_NEW_CAMERA_API
|
||||
class API_AVAILABLE (macos (10.15)) PostCatalinaPhotoOutput : public ImageOutputBase
|
||||
{
|
||||
public:
|
||||
|
|
@ -339,7 +330,6 @@ private:
|
|||
AVCapturePhotoOutput* imageOutput = nil;
|
||||
NSUniquePtr<NSObject<AVCapturePhotoCaptureDelegate>> delegate;
|
||||
};
|
||||
#endif
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
class PreCatalinaStillImageOutput : public ImageOutputBase
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue