This commit is contained in:
Twinaphex 2020-09-17 21:57:35 +02:00
parent 27bb73dd37
commit 0651185ea3

View File

@ -241,27 +241,29 @@ void *glkitview_init(void);
/* NOTE: This version runs on iOS2-iOS5, but not iOS6+. */ /* NOTE: This version runs on iOS2-iOS5, but not iOS6+. */
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{ {
unsigned orientation_flags = apple_frontend_settings.orientation_flags;
switch (interfaceOrientation) switch (interfaceOrientation)
{ {
case UIInterfaceOrientationPortrait: case UIInterfaceOrientationPortrait:
return (apple_frontend_settings.orientation_flags return (orientation_flags
& UIInterfaceOrientationMaskPortrait); & UIInterfaceOrientationMaskPortrait);
case UIInterfaceOrientationPortraitUpsideDown: case UIInterfaceOrientationPortraitUpsideDown:
return (apple_frontend_settings.orientation_flags return (orientation_flags
& UIInterfaceOrientationMaskPortraitUpsideDown); & UIInterfaceOrientationMaskPortraitUpsideDown);
case UIInterfaceOrientationLandscapeLeft: case UIInterfaceOrientationLandscapeLeft:
return (apple_frontend_settings.orientation_flags return (orientation_flags
& UIInterfaceOrientationMaskLandscapeLeft); & UIInterfaceOrientationMaskLandscapeLeft);
case UIInterfaceOrientationLandscapeRight: case UIInterfaceOrientationLandscapeRight:
return (apple_frontend_settings.orientation_flags return (orientation_flags
& UIInterfaceOrientationMaskLandscapeRight); & UIInterfaceOrientationMaskLandscapeRight);
default: default:
return (apple_frontend_settings.orientation_flags break;
& UIInterfaceOrientationMaskAll);
} }
return YES; return (orientation_flags
& UIInterfaceOrientationMaskAll);
} }
#endif #endif