mirror of
https://github.com/yawut/SDL.git
synced 2026-07-01 00:39:58 -05:00
User interface guidelines says that you shouldn't allow upside-down orientation on phones.
This commit is contained in:
parent
056236c4e8
commit
608431669d
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user