diff --git a/Limelight/Limelight-Info.plist b/Limelight/Limelight-Info.plist
index e3f9934d..541e31d5 100644
--- a/Limelight/Limelight-Info.plist
+++ b/Limelight/Limelight-Info.plist
@@ -73,6 +73,8 @@
armv7
+ UIRequiresFullScreen
+
UIStatusBarHidden
UISupportedInterfaceOrientations
diff --git a/Limelight/Localization/Localizable.xcstrings b/Limelight/Localization/Localizable.xcstrings
index 72f3130f..516039dc 100644
--- a/Limelight/Localization/Localizable.xcstrings
+++ b/Limelight/Localization/Localizable.xcstrings
@@ -588,29 +588,6 @@
}
}
},
- "Contact True砖家(the Developer)" : {
- "extractionState" : "manual",
- "localizations" : {
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "开发者: True砖家 (B站)"
- }
- },
- "zh-Hant" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "开发者: True砖家 (B站)"
- }
- },
- "zh-HK" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "开发者: True砖家 (B站)"
- }
- }
- }
- },
"Current profile updated successfully" : {
"extractionState" : "manual",
"localizations" : {
@@ -2136,6 +2113,35 @@
}
}
},
+ "screenRotationTIp" : {
+ "extractionState" : "manual",
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tips: Manually lock screen orientation to avoid display anomalies"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "needs_review",
+ "value" : "提示: 手动锁定屏幕方向避免串流显示异常"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "needs_review",
+ "value" : "提示: 手动锁定屏幕方向避免串流显示异常"
+ }
+ },
+ "zh-HK" : {
+ "stringUnit" : {
+ "state" : "needs_review",
+ "value" : "提示: 手动锁定屏幕方向避免串流显示异常"
+ }
+ }
+ }
+ },
"Searching for PCs on your network..." : {
"extractionState" : "manual",
"localizations" : {
@@ -2505,7 +2511,7 @@
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
- "value" : "提示: 从屏幕连续滑动一定距离退出远程桌面. 滑动边缘和距离取决于菜单设置."
+ "value" : "\\n提示: 从屏幕连续滑动一定距离退出远程桌面. 滑动边缘和距离取决于菜单设置."
}
}
}
@@ -2844,6 +2850,35 @@
}
}
},
+ "waterMarkText" : {
+ "extractionState" : "manual",
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Contact True砖家(the Developer)"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "needs_review",
+ "value" : "开发者: True砖家 (B站)"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "needs_review",
+ "value" : "开发者: True砖家 (B站)"
+ }
+ },
+ "zh-HK" : {
+ "stringUnit" : {
+ "state" : "needs_review",
+ "value" : "开发者: True砖家 (B站)"
+ }
+ }
+ }
+ },
"Your network connection isn't performing well. Reduce your video bitrate setting or try a faster connection." : {
"extractionState" : "manual",
"localizations" : {
diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m
index 9fcd4acf..fcd616b3 100644
--- a/Limelight/ViewControllers/MainFrameViewController.m
+++ b/Limelight/ViewControllers/MainFrameViewController.m
@@ -1004,16 +1004,39 @@ static NSMutableSet* hostList;
}
}
+- (BOOL)isFullScreenRequired {
+ NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
+ NSNumber *requiresFullScreen = infoDictionary[@"UIRequiresFullScreen"];
+
+ if (requiresFullScreen != nil) {
+ return [requiresFullScreen boolValue];
+ }
+ // Default behavior if the key is not set
+ return YES;
+}
+
+
- (void)attachWaterMark {
// Create and configure the label
if(true){
[self->waterMark removeFromSuperview];
self->waterMark = [[UILabel alloc] init];
self->waterMark.translatesAutoresizingMaskIntoConstraints = NO;
- self->waterMark.text = [LocalizationHelper localizedStringForKey:@"Contact True砖家(the Developer)"];
- self->waterMark.textColor = UIColor.blackColor;
- self->waterMark.alpha = 0.2;
+ self->waterMark.numberOfLines = 1;
self->waterMark.font = [UIFont systemFontOfSize:22];
+ self->waterMark.text = [LocalizationHelper localizedStringForKey:@"waterMarkText"];
+ CGFloat labelHeight = 60;
+ NSLog(@"fullscr: %d", [self isFullScreenRequired]);
+ // the app is unable to automatically lock screen orientation in app window resiable mode(aka. not require fullscreen)
+ if(![self isFullScreenRequired]){
+ NSString* screenRotationTip = [LocalizationHelper localizedStringForKey:@"screenRotationTIp"];
+ self->waterMark.text = [NSString stringWithFormat:@"%@\n%@", self->waterMark.text, screenRotationTip];
+ self->waterMark.numberOfLines = 0; // Allow multiline text
+ self->waterMark.font = [UIFont systemFontOfSize:19];
+ labelHeight = 80;
+ }
+ self->waterMark.textColor = UIColor.blackColor;
+ self->waterMark.alpha = 0.35;
self->waterMark.textAlignment = NSTextAlignmentCenter;
self->waterMark.backgroundColor = [UIColor clearColor];
self->waterMark.userInteractionEnabled = YES; // Enable user interaction for tap gesture
@@ -1024,10 +1047,10 @@ static NSMutableSet* hostList;
[self.view addSubview:self->waterMark];
// Set up constraints
[NSLayoutConstraint activateConstraints:@[
- [self->waterMark.centerXAnchor constraintEqualToAnchor:self.view.rightAnchor constant:-185], // Aligns the horizontal center of label to the horizontal center of view
- [self->waterMark.centerYAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:-50], // Aligns the vertical center of label to the vertical center of view
+ [self->waterMark.centerXAnchor constraintEqualToAnchor:self.view.rightAnchor constant:-210], // Aligns the horizontal center of label to the horizontal center of view
+ [self->waterMark.centerYAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:-(labelHeight+10)], // Aligns the vertical center of label to the vertical center of view
[self->waterMark.widthAnchor constraintEqualToConstant:500], // Sets the width of label to 200 points
- [self->waterMark.heightAnchor constraintEqualToConstant:60] // Sets the height of label to 50 points
+ [self->waterMark.heightAnchor constraintEqualToConstant:labelHeight] // Sets the height of label to 50 points
]];
}
}
diff --git a/Limelight/ViewControllers/StreamFrameViewController.m b/Limelight/ViewControllers/StreamFrameViewController.m
index 3af3db5b..babc59fd 100644
--- a/Limelight/ViewControllers/StreamFrameViewController.m
+++ b/Limelight/ViewControllers/StreamFrameViewController.m
@@ -864,7 +864,7 @@
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
Log(LOG_I, @"View size changed, terminating stream");
- [self returnToMainFrame];
+ // [self returnToMainFrame];
}
@end