diff options
Diffstat (limited to 'src/SFML/Window/iOS/SFAppDelegate.mm')
-rw-r--r-- | src/SFML/Window/iOS/SFAppDelegate.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SFML/Window/iOS/SFAppDelegate.mm b/src/SFML/Window/iOS/SFAppDelegate.mm index 6b17384..ea69f41 100644 --- a/src/SFML/Window/iOS/SFAppDelegate.mm +++ b/src/SFML/Window/iOS/SFAppDelegate.mm @@ -56,6 +56,10 @@ namespace //////////////////////////////////////////////////////////// + (SFAppDelegate*)getInstance { + NSAssert(delegateInstance, + @"SFAppDelegate instance is nil, this means SFML was not properly initialized. " + "Make sure that the file defining your main() function includes <SFML/Main.hpp>"); + return delegateInstance; } @@ -173,7 +177,7 @@ namespace NSArray *supportedOrientations = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UISupportedInterfaceOrientations"]; if (!supportedOrientations) - return false; + return (1 << orientation) & [rootViewController supportedInterfaceOrientations]; int appFlags = 0; if ([supportedOrientations containsObject:@"UIInterfaceOrientationPortrait"]) |