Skip to content

Commit

Permalink
[iOS] remove legacy rotation code
Browse files Browse the repository at this point in the history
  • Loading branch information
kambala-decapitator committed Apr 29, 2019
1 parent 192575d commit 55ed2b7
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions xbmc/platform/darwin/ios/XBMCController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -133,37 +133,9 @@ - (void)deleteBackward
}
// END OF UIKeyInput protocol

// - iOS6 rotation API - will be called on iOS7 runtime!--------
- (NSUInteger)supportedInterfaceOrientations
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
//mask defines available as of ios6 sdk
//return UIInterfaceOrientationMaskLandscape;
return (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight);
}
// - old rotation API will be called on iOS6 and lower - removed in iOS7
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//on external screens somehow the logic is rotated by 90°
//so we have to do this with our supported orientations then aswell
if([[IOSScreenManager sharedInstance] isExternalScreen])
{
if(interfaceOrientation == UIInterfaceOrientationPortrait)
{
return YES;
}
}
else//internal screen
{
if(interfaceOrientation == UIInterfaceOrientationLandscapeLeft)
{
return YES;
}
else if(interfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
return YES;
}
}
return NO;
return UIInterfaceOrientationMaskLandscape;
}
//--------------------------------------------------------------
- (UIInterfaceOrientation) getOrientation
Expand Down

0 comments on commit 55ed2b7

Please sign in to comment.