Просмотр исходного кода

Include iOS 8 orientation fix conditionally. Fixes #635.

Lasse Öörni 11 лет назад
Родитель
Сommit
e67d9d3065
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      Source/ThirdParty/SDL/src/video/uikit/SDL_uikitwindow.m

+ 4 - 0
Source/ThirdParty/SDL/src/video/uikit/SDL_uikitwindow.m

@@ -53,9 +53,13 @@
     [super layoutSubviews];
 
     // Forcibly set window frame based on screen bounds, which follow the orientation on iOS 8
+    // Note: we compile this hack only when the version define exists (iOS SDK 8.1); Urho3D compiled
+    // on earlier iOS SDK's did not need this behavior, even when running on an iOS 8 device
+#ifdef NSFoundationVersionNumber_iOS_7_1
     if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1) {
         self.frame = self.screen.bounds;
     }
+#endif
 }
 @end