Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
User interface guidelines says that you shouldn't allow upside-down o…
Browse files Browse the repository at this point in the history
…rientation on phones.
  • Loading branch information
slouken committed Sep 19, 2012
1 parent 43d4365 commit 9f3a1f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/uikit/SDL_uikitviewcontroller.m
Expand Up @@ -48,6 +48,12 @@ - (id)initWithSDLWindow:(SDL_Window *)_window

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient
{
// Don't allow upside-down orientation on the phone, so answering calls is in the natural orientation
if (orient == UIInterfaceOrientationPortraitUpsideDown) {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
return NO;
}

const char *orientationsCString;
if ((orientationsCString = SDL_GetHint(SDL_HINT_ORIENTATIONS)) != NULL) {
BOOL rotate = NO;
Expand Down

0 comments on commit 9f3a1f1

Please sign in to comment.