User interface guidelines says that you shouldn't allow upside-down orientation on phones.

This commit is contained in:
Sam Lantinga 2012-09-18 22:24:40 -07:00
parent 4684591de2
commit 1ab7a260eb

View file

@ -48,6 +48,12 @@
- (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;