Browse Source

iOS: Fixed some build warnings

tags/2021-05-28
ed 5 years ago
parent
commit
021034a401
2 changed files with 13 additions and 2 deletions
  1. +7
    -1
      modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm
  2. +6
    -1
      modules/juce_video/native/juce_ios_CameraDevice.h

+ 7
- 1
modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm View File

@@ -39,6 +39,7 @@ namespace Orientations
case UIInterfaceOrientationPortraitUpsideDown: return Desktop::upsideDown; case UIInterfaceOrientationPortraitUpsideDown: return Desktop::upsideDown;
case UIInterfaceOrientationLandscapeLeft: return Desktop::rotatedClockwise; case UIInterfaceOrientationLandscapeLeft: return Desktop::rotatedClockwise;
case UIInterfaceOrientationLandscapeRight: return Desktop::rotatedAntiClockwise; case UIInterfaceOrientationLandscapeRight: return Desktop::rotatedAntiClockwise;
case UIInterfaceOrientationUnknown:
default: jassertfalse; // unknown orientation! default: jassertfalse; // unknown orientation!
} }
@@ -53,6 +54,7 @@ namespace Orientations
case Desktop::upsideDown: return UIInterfaceOrientationPortraitUpsideDown; case Desktop::upsideDown: return UIInterfaceOrientationPortraitUpsideDown;
case Desktop::rotatedClockwise: return UIInterfaceOrientationLandscapeLeft; case Desktop::rotatedClockwise: return UIInterfaceOrientationLandscapeLeft;
case Desktop::rotatedAntiClockwise: return UIInterfaceOrientationLandscapeRight; case Desktop::rotatedAntiClockwise: return UIInterfaceOrientationLandscapeRight;
case Desktop::allOrientations:
default: jassertfalse; // unknown orientation! default: jassertfalse; // unknown orientation!
} }
@@ -68,7 +70,9 @@ namespace Orientations
case Desktop::upsideDown: return CGAffineTransformMake (-1, 0, 0, -1, 0, 0); case Desktop::upsideDown: return CGAffineTransformMake (-1, 0, 0, -1, 0, 0);
case Desktop::rotatedClockwise: return CGAffineTransformMake (0, -1, 1, 0, 0, 0); case Desktop::rotatedClockwise: return CGAffineTransformMake (0, -1, 1, 0, 0, 0);
case Desktop::rotatedAntiClockwise: 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;
} }
} }
@@ -259,6 +263,7 @@ public:
return Rectangle<int> (screen.getWidth() - r.getBottom(), r.getX(), return Rectangle<int> (screen.getWidth() - r.getBottom(), r.getX(),
r.getHeight(), r.getWidth()); r.getHeight(), r.getWidth());
case UIInterfaceOrientationUnknown:
default: jassertfalse; // unknown orientation! default: jassertfalse; // unknown orientation!
} }
} }
@@ -289,6 +294,7 @@ public:
return Rectangle<int> (r.getY(), screen.getWidth() - r.getRight(), return Rectangle<int> (r.getY(), screen.getWidth() - r.getRight(),
r.getHeight(), r.getWidth()); r.getHeight(), r.getWidth());
case UIInterfaceOrientationUnknown:
default: jassertfalse; // unknown orientation! default: jassertfalse; // unknown orientation!
} }
} }


+ 6
- 1
modules/juce_video/native/juce_ios_CameraDevice.h View File

@@ -270,7 +270,8 @@ private:
{ {
case AVCaptureAutoFocusSystemPhaseDetection: autoFocusSystemString = "PhaseDetection"; break; case AVCaptureAutoFocusSystemPhaseDetection: autoFocusSystemString = "PhaseDetection"; break;
case AVCaptureAutoFocusSystemContrastDetection: autoFocusSystemString = "ContrastDetection"; break; case AVCaptureAutoFocusSystemContrastDetection: autoFocusSystemString = "ContrastDetection"; break;
default: autoFocusSystemString = "None";
case AVCaptureAutoFocusSystemNone:
default: autoFocusSystemString = "None";
} }
JUCE_CAMERA_LOG ("Auto focus system: " + autoFocusSystemString); JUCE_CAMERA_LOG ("Auto focus system: " + autoFocusSystemString);
@@ -859,6 +860,10 @@ private:
CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth); CGContextScaleCTM (context, targetSize.height / origHeight, -targetSize.width / origWidth);
CGContextTranslateCTM (context, -targetSize.width, -targetSize.height); CGContextTranslateCTM (context, -targetSize.width, -targetSize.height);
break; break;
case kCGImagePropertyOrientationUpMirrored:
case kCGImagePropertyOrientationDownMirrored:
case kCGImagePropertyOrientationLeftMirrored:
case kCGImagePropertyOrientationRightMirrored:
default: default:
// Not implemented. // Not implemented.
jassertfalse; jassertfalse;


Loading…
Cancel
Save