mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-16 13:23:07 +00:00
fix orientation issues
This commit is contained in:
@@ -173,4 +173,26 @@ static StreamConfiguration* streamConfig;
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotate {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSUInteger)supportedInterfaceOrientations {
|
||||
NSString *deviceType = [UIDevice currentDevice].model;
|
||||
if ([deviceType containsString:@"iPhone"] || [deviceType containsString:@"iPod"]) {
|
||||
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
|
||||
} else {
|
||||
return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
|
||||
NSString *deviceType = [UIDevice currentDevice].model;
|
||||
if ([deviceType containsString:@"iPhone"] || [deviceType containsString:@"iPod"]) {
|
||||
return UIInterfaceOrientationPortrait;
|
||||
} else {
|
||||
return UIInterfaceOrientationLandscapeLeft;
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user