From 11cf10689dfb6cd93aba954e2962972a9dedb187 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 27 Apr 2020 18:20:59 +0100 Subject: [PATCH] iOS: Fixed some build warnings --- .../native/juce_ios_UIViewComponentPeer.mm | 8 +++++++- modules/juce_video/native/juce_ios_CameraDevice.h | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index e47f7a3097..5e6508e56b 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -47,6 +47,7 @@ namespace Orientations case UIInterfaceOrientationPortraitUpsideDown: return Desktop::upsideDown; case UIInterfaceOrientationLandscapeLeft: return Desktop::rotatedClockwise; case UIInterfaceOrientationLandscapeRight: return Desktop::rotatedAntiClockwise; + case UIInterfaceOrientationUnknown: default: jassertfalse; // unknown orientation! } @@ -61,6 +62,7 @@ namespace Orientations case Desktop::upsideDown: return UIInterfaceOrientationPortraitUpsideDown; case Desktop::rotatedClockwise: return UIInterfaceOrientationLandscapeLeft; case Desktop::rotatedAntiClockwise: return UIInterfaceOrientationLandscapeRight; + case Desktop::allOrientations: default: jassertfalse; // unknown orientation! } @@ -76,7 +78,9 @@ namespace Orientations case Desktop::upsideDown: return CGAffineTransformMake (-1, 0, 0, -1, 0, 0); case Desktop::rotatedClockwise: return CGAffineTransformMake (0, -1, 1, 0, 0, 0); case Desktop::rotatedAntiClockwise: return CGAffineTransformMake (0, 1, -1, 0, 0, 0); - default: break; + case Desktop::upright: + case Desktop::allOrientations: + default: break; } } @@ -267,6 +271,7 @@ public: return Rectangle (screen.getWidth() - r.getBottom(), r.getX(), r.getHeight(), r.getWidth()); + case UIInterfaceOrientationUnknown: default: jassertfalse; // unknown orientation! } } @@ -297,6 +302,7 @@ public: return Rectangle (r.getY(), screen.getWidth() - r.getRight(), r.getHeight(), r.getWidth()); + case UIInterfaceOrientationUnknown: default: jassertfalse; // unknown orientation! } } diff --git a/modules/juce_video/native/juce_ios_CameraDevice.h b/modules/juce_video/native/juce_ios_CameraDevice.h index 1a1c495c4e..b994f67d4d 100644 --- a/modules/juce_video/native/juce_ios_CameraDevice.h +++ b/modules/juce_video/native/juce_ios_CameraDevice.h @@ -278,7 +278,8 @@ private: { case AVCaptureAutoFocusSystemPhaseDetection: autoFocusSystemString = "PhaseDetection"; break; case AVCaptureAutoFocusSystemContrastDetection: autoFocusSystemString = "ContrastDetection"; break; - default: autoFocusSystemString = "None"; + case AVCaptureAutoFocusSystemNone: + default: autoFocusSystemString = "None"; } JUCE_CAMERA_LOG ("Auto focus system: " + autoFocusSystemString); @@ -869,6 +870,10 @@ private: CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth); CGContextTranslateCTM (context, -targetSize.width, -targetSize.height); break; + case kCGImagePropertyOrientationUpMirrored: + case kCGImagePropertyOrientationDownMirrored: + case kCGImagePropertyOrientationLeftMirrored: + case kCGImagePropertyOrientationRightMirrored: default: // Not implemented. jassertfalse;