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