From 1b1ae8e48e9e6f1ecc45b34b9e3b62dc46150ebc Mon Sep 17 00:00:00 2001 From: Jonny Paton Date: Thu, 12 Apr 2018 11:58:46 -0700 Subject: [PATCH] Use default supported rotations when none are specified --- src/SFML/Window/iOS/SFAppDelegate.mm | 2 +- src/SFML/Window/iOS/SFViewController.hpp | 8 -------- src/SFML/Window/iOS/SFViewController.mm | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/SFML/Window/iOS/SFAppDelegate.mm b/src/SFML/Window/iOS/SFAppDelegate.mm index 6b173849e..4177eb3d6 100644 --- a/src/SFML/Window/iOS/SFAppDelegate.mm +++ b/src/SFML/Window/iOS/SFAppDelegate.mm @@ -173,7 +173,7 @@ namespace NSArray *supportedOrientations = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UISupportedInterfaceOrientations"]; if (!supportedOrientations) - return false; + return (1 << orientation) & [rootViewController supportedInterfaceOrientations]; int appFlags = 0; if ([supportedOrientations containsObject:@"UIInterfaceOrientationPortrait"]) diff --git a/src/SFML/Window/iOS/SFViewController.hpp b/src/SFML/Window/iOS/SFViewController.hpp index b8a77aadc..2b65d3585 100644 --- a/src/SFML/Window/iOS/SFViewController.hpp +++ b/src/SFML/Window/iOS/SFViewController.hpp @@ -55,14 +55,6 @@ //////////////////////////////////////////////////////////// - (BOOL)shouldAutorotate; -//////////////////////////////////////////////////////////// -/// \brief Returns the supported orientations (iOS >= 6) -/// -/// \return A combination of all the supported orientations -/// -//////////////////////////////////////////////////////////// -- (NSUInteger)supportedInterfaceOrientations; - //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// diff --git a/src/SFML/Window/iOS/SFViewController.mm b/src/SFML/Window/iOS/SFViewController.mm index d8be04782..8c23cdcfd 100644 --- a/src/SFML/Window/iOS/SFViewController.mm +++ b/src/SFML/Window/iOS/SFViewController.mm @@ -46,12 +46,4 @@ return self.orientationCanChange; } - -//////////////////////////////////////////////////////////// -- (NSUInteger)supportedInterfaceOrientations -{ - return UIInterfaceOrientationMaskAll; -} - - @end