From abc7805aaba578e1af468069c58b39f447143037 Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Mon, 29 Jul 2024 12:27:47 +0800 Subject: [PATCH] add high bitrate warning to the settings view --- Limelight/Localization/Localizable.xcstrings | 23 +++++++++++++++++++ .../ViewControllers/SettingsViewController.m | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Limelight/Localization/Localizable.xcstrings b/Limelight/Localization/Localizable.xcstrings index 65ba54cb..84c0e96b 100644 --- a/Limelight/Localization/Localizable.xcstrings +++ b/Limelight/Localization/Localizable.xcstrings @@ -214,6 +214,29 @@ } } }, + "Bitrate: %.1f Mbps - Use High Bitrates with Caution!" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "串流码率: %.1f Mbps - 码率偏高, 谨慎使用!" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "串流码率: %.1f Mbps - 码率偏高, 谨慎使用!" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "串流码率: %.1f Mbps - 码率偏高, 谨慎使用!" + } + } + } + }, "Cancel" : { "extractionState" : "manual", "localizations" : { diff --git a/Limelight/ViewControllers/SettingsViewController.m b/Limelight/ViewControllers/SettingsViewController.m index 8b9d4e8f..de831a7c 100644 --- a/Limelight/ViewControllers/SettingsViewController.m +++ b/Limelight/ViewControllers/SettingsViewController.m @@ -821,7 +821,8 @@ BOOL isCustomResolution(CGSize res) { - (void) updateBitrateText { // Display bitrate in Mbps - [self.bitrateLabel setText:[LocalizationHelper localizedStringForKey:@"Bitrate: %.1f Mbps", _bitrate / 1000.]]; + if(_bitrate / 1000. > 50.0) [self.bitrateLabel setText:[LocalizationHelper localizedStringForKey:@"Bitrate: %.1f Mbps - Use High Bitrates with Caution!", _bitrate / 1000.]]; + else [self.bitrateLabel setText:[LocalizationHelper localizedStringForKey:@"Bitrate: %.1f Mbps", _bitrate / 1000.]]; } - (NSInteger) getChosenFrameRate {