Added UIInterfaceOrientationMask for building with older iOS SDKs
authorSam Lantinga <slouken@libsdl.org>
Sun, 23 Sep 2012 17:01:58 -0700
changeset 6452 1895319021e4
parent 6451 52e5a05ca795
child 6453 f71e3fdba072
Added UIInterfaceOrientationMask for building with older iOS SDKs
src/video/uikit/SDL_uikitviewcontroller.m
--- a/src/video/uikit/SDL_uikitviewcontroller.m	Sun Sep 23 03:46:49 2012 -0700
+++ b/src/video/uikit/SDL_uikitviewcontroller.m	Sun Sep 23 17:01:58 2012 -0700
@@ -32,6 +32,20 @@
 #include "SDL_uikitviewcontroller.h"
 #include "SDL_uikitvideo.h"
 
+#ifndef __IPHONE_6_0
+// This enum isn't available in older SDKs, but we use it for our own purposes on iOS 5.1 and for the system on iOS 6.0
+enum UIInterfaceOrientationMask) {
+    UIInterfaceOrientationMaskPortrait = (1 << UIInterfaceOrientationPortrait),
+    UIInterfaceOrientationMaskLandscapeLeft = (1 << UIInterfaceOrientationLandscapeLeft),
+    UIInterfaceOrientationMaskLandscapeRight = (1 << UIInterfaceOrientationLandscapeRight),
+    UIInterfaceOrientationMaskPortraitUpsideDown = (1 << UIInterfaceOrientationPortraitUpsideDown),
+    UIInterfaceOrientationMaskLandscape = (UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight),
+    UIInterfaceOrientationMaskAll = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortraitUpsideDown),
+    UIInterfaceOrientationMaskAllButUpsideDown = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight),
+};
+#endif // !__IPHONE_6_0
+
+    
 @implementation SDL_uikitviewcontroller
 
 @synthesize window;