From afc6289a5611f247e9aaeb8131b9296cfef9611a Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Tue, 10 Feb 2026 19:54:53 +0800 Subject: [PATCH] - disable sdr performance workaround for av1 - UI string changes --- VoidLink/Base.lproj/iPad.storyboard | 44 +++++++------------ VoidLink/Base.lproj/iPhone.storyboard | 36 +++++---------- VoidLink/Localization/Localizable.xcstrings | 37 ++++++++++++++-- VoidLink/Utility/Utils.m | 3 +- .../ViewControllers/MainFrameViewController.m | 8 ++-- .../ViewControllers/SettingsViewController.m | 15 +++++-- 6 files changed, 79 insertions(+), 64 deletions(-) diff --git a/VoidLink/Base.lproj/iPad.storyboard b/VoidLink/Base.lproj/iPad.storyboard index 2880ecea..bd7b6e40 100644 --- a/VoidLink/Base.lproj/iPad.storyboard +++ b/VoidLink/Base.lproj/iPad.storyboard @@ -184,19 +184,16 @@ - + - + @@ -429,19 +426,16 @@ - + - + @@ -563,19 +557,16 @@ - + - + @@ -586,19 +577,16 @@ - + - + @@ -3208,19 +3196,19 @@ - + - + - + - + diff --git a/VoidLink/Base.lproj/iPhone.storyboard b/VoidLink/Base.lproj/iPhone.storyboard index bd7a881a..7ec60722 100644 --- a/VoidLink/Base.lproj/iPhone.storyboard +++ b/VoidLink/Base.lproj/iPhone.storyboard @@ -1147,19 +1147,16 @@ - + - + @@ -1664,19 +1661,16 @@ - + - + @@ -1820,19 +1814,16 @@ - + - + @@ -1843,19 +1834,16 @@ - + - + diff --git a/VoidLink/Localization/Localizable.xcstrings b/VoidLink/Localization/Localizable.xcstrings index a06fc608..f381aff0 100644 --- a/VoidLink/Localization/Localizable.xcstrings +++ b/VoidLink/Localization/Localizable.xcstrings @@ -6619,6 +6619,35 @@ } } }, + "sdrPerformanceWorkaroundStackTip" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Recommended to enable when streaming in SDR.\nIf you experience overexposed visuals, restart the Sunshine service and disable this option." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "建议进行SDR串流时打开。\n如出现画面过曝问题,重启Sunshine服务本并关闭此选项。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "建議在進行 SDR 串流時啟用此選項。\n若出現畫面過曝的問題,請重新啟動 Sunshine 服務,並停用此選項。" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "建議在進行 SDR 串流時啟用此選項。\n若出現畫面過曝的問題,請重新啟動 Sunshine 服務,並停用此選項。" + } + } + } + }, "Searching for PCs on your network..." : { "extractionState" : "manual", "localizations" : { @@ -8259,25 +8288,25 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "- Enabling the YUV 4:4:4 option provides higher color fidelity but also requires greater bandwidth.\n\n- Since Apple does not provide an API to determine whether a device supports hardware decoding of YUV 4:4:4 video, you will need to enable this option manually to verify compatibility. On some devices, this may cause issues such as loss of video brightness." + "value" : "When enabling YUV 4:4:4, it is recommended to also enable “SDR Performance Workaround.”" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "- 开启YUV 4:4:4 选项可提供更高色彩保真度, 但对带宽要求也更高. \n\n- 由于Apple并未提供API判断设备是否支持YUV 4:4:4视频硬解码, 您需要自行打开该选项确认是否可用. 某些设备会因此产生视频亮度丢失的问题." + "value" : "开启YUV 4:4:4 时,建议同时开启“SDR性能优化路径“" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "- 啟用 YUV 4:4:4 選項可提供更高的色彩保真度,但也需要更大的頻寬。\n\n- 由於 Apple 未提供 API 來判斷裝置是否支援 YUV 4:4:4 視訊的硬體解碼,您需要手動啟用此選項以驗證相容性。在某些裝置上,這可能會導致視訊亮度遺失等問題。" + "value" : "啟用 YUV 4:4:4 時,建議同時啟用「SDR 效能優化路徑」。" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "- 啟用 YUV 4:4:4 選項可提供更高的色彩保真度,但也需要更大的頻寬。\n\n- 由於 Apple 未提供 API 來判斷裝置是否支援 YUV 4:4:4 視訊的硬體解碼,您需要手動啟用此選項以驗證相容性。在某些裝置上,這可能會導致視訊亮度遺失等問題。" + "value" : "啟用 YUV 4:4:4 時,建議同時啟用「SDR 效能優化路徑」。" } } } diff --git a/VoidLink/Utility/Utils.m b/VoidLink/Utility/Utils.m index a21d5ccf..0b548ea6 100644 --- a/VoidLink/Utility/Utils.m +++ b/VoidLink/Utility/Utils.m @@ -156,7 +156,8 @@ NSString *const deviceName = @"roth"; } + (bool)needUpdateDefaultSettings { - NSString *key = @"needUpdateDefaultSettings20260209"; + // NSString *key = @"needUpdateDefaultSettings20260209"; + NSString *key = @"needUpdateDefaultSettings20260210"; BOOL updatedBefore = [[NSUserDefaults standardUserDefaults] boolForKey:key]; if (!updatedBefore) { diff --git a/VoidLink/ViewControllers/MainFrameViewController.m b/VoidLink/ViewControllers/MainFrameViewController.m index 6c8c606a..0427efb5 100644 --- a/VoidLink/ViewControllers/MainFrameViewController.m +++ b/VoidLink/ViewControllers/MainFrameViewController.m @@ -876,7 +876,7 @@ static NSMutableSet* hostList; _streamConfig.supportedVideoFormats |= VIDEO_FORMAT_AV1_HIGH8_444; } else { - if(streamSettings.sdrPerformanceWorkaround && [Utils hdrSupported]) _streamConfig.supportedVideoFormats |= VIDEO_FORMAT_AV1_MAIN10; // 8bit performance degradation workaround for av1 + if(streamSettings.sdrPerformanceWorkaround && [Utils hdrSupported] && false) _streamConfig.supportedVideoFormats |= VIDEO_FORMAT_AV1_MAIN10; // 8bit performance degradation workaround for av1 else _streamConfig.supportedVideoFormats |= VIDEO_FORMAT_AV1_MAIN8; } } @@ -1580,15 +1580,15 @@ static NSMutableSet* hostList; Settings* settings = [dataMan retrieveSettings]; switch ([UIDevice currentDevice].userInterfaceIdiom) { case UIUserInterfaceIdiomPad: - settings.sdrPerformanceWorkaround = true; + settings.sdrPerformanceWorkaround = false; settings.framePacingMode = @(FramePacingModeQueue); break; case UIUserInterfaceIdiomPhone: - settings.sdrPerformanceWorkaround = true; + settings.sdrPerformanceWorkaround = false; settings.framePacingMode = @(FramePacingModeQueue); break; default: - settings.sdrPerformanceWorkaround = true; + settings.sdrPerformanceWorkaround = false; settings.framePacingMode = @(FramePacingModeQueue); break; } diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index 1bfa8526..09650580 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -794,6 +794,7 @@ BOOL isCustomResolution(int resolutionSelected) { [self addSetting:self.codecStack ofId:@"codecStack" withInfoTag:NO withDynamicLabel:NO to:videoSection]; [self addSetting:self.hdrStack ofId:@"hdrStack" withInfoTag:![Utils hdrSupported] withDynamicLabel:NO to:videoSection]; [self addSetting:self.yuv444Stack ofId:@"yuv444Stack" withInfoTag:YES withDynamicLabel:NO to:videoSection]; + [self addSetting:self.sdrPerformanceWorkaroundStack ofId:@"sdrPerformanceWorkaroundStack" withInfoTag:YES withDynamicLabel:NO to:videoSection]; [self addSetting:self.fullColorRangeStack ofId:@"fullColorRangeStack" withInfoTag:NO withDynamicLabel:NO to:videoSection]; [self addSetting:self.pipStack ofId:@"pipStack" withInfoTag:YES withDynamicLabel:NO to:videoSection]; [self addSetting:self.framePacingStack ofId:@"framePacingStack" withInfoTag:YES withDynamicLabel:NO to:videoSection]; @@ -978,10 +979,9 @@ BOOL isCustomResolution(int resolutionSelected) { [self addSetting:self.relativeTouchSlideThresholdStack ofId:@"relativeTouchSlideThresholdStack" withInfoTag:YES withDynamicLabel:YES to:experimentalSection]; [self addSetting:self.singleTapSensitivityStack ofId:@"singleTapSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:experimentalSection]; [self addSetting:self.leftClickDelayStack ofId:@"leftClickDelayStack" withInfoTag:NO withDynamicLabel:YES to:experimentalSection]; - [self addSetting:self.sdrPerformanceWorkaroundStack ofId:@"sdrPerformanceWorkaroundStack" withInfoTag:NO withDynamicLabel:NO to:experimentalSection]; [self addSetting:self.renderingBackendStack ofId:@"renderingBackendStack" withInfoTag:YES withDynamicLabel:NO to:experimentalSection]; // [self addSetting:self.frameTimebaseStack ofId:@"frameTimebaseStack" withInfoTag:NO withDynamicLabel:NO to:videoSection]; - [self addSetting:self.asyncFrameDequeueStack ofId:@"asyncFrameDequeueStack" withInfoTag:NO withDynamicLabel:NO to:experimentalSection]; + // [self addSetting:self.asyncFrameDequeueStack ofId:@"asyncFrameDequeueStack" withInfoTag:NO withDynamicLabel:NO to:experimentalSection]; [self addSetting:self.performanceGraphStack ofId:@"performanceGraphStack" withInfoTag:YES withDynamicLabel:NO to:experimentalSection]; [self addDynamicLabelForStack:self.graphOpacityStack]; @@ -1347,7 +1347,7 @@ BOOL isCustomResolution(int resolutionSelected) { } if([sender.superview.accessibilityIdentifier isEqualToString: @"yuv444Stack"]){ tipText = [LocalizationHelper localizedStringForKey:@"yuv444StackTip"]; - showOnlineDocAction = true; + showOnlineDocAction = false; onlineDocLink = @"https://voidlink.yuque.com/org-wiki-voidlink-znirha/fa3tgr/koeimmrvt4o17auc"; } if([sender.superview.accessibilityIdentifier isEqualToString: @"touchModeStack"]){ @@ -1510,6 +1510,12 @@ BOOL isCustomResolution(int resolutionSelected) { ]; showOnlineDocAction = false; } + if([sender.superview.accessibilityIdentifier isEqualToString: @"sdrPerformanceWorkaroundStack"]){ + tipText = [LocalizationHelper localizedStringForKey:@"sdrPerformanceWorkaroundStackTip"]; + showOnlineDocAction = false; + } + + UIAlertController *tipsAlertController = [UIAlertController alertControllerWithTitle: [LocalizationHelper localizedStringForKey:@"Tips"] message:tipText preferredStyle:UIAlertControllerStyleAlert]; @@ -3719,6 +3725,9 @@ BOOL isCustomResolution(int resolutionSelected) { // AV1 doesn't support YUV444, so disable it and turn it off [self.yuv444Switch setOn:NO animated:NO]; [self.yuv444Switch setEnabled:NO]; + [self.sdrPerformanceWorkaroundSwitch setOn:NO animated:NO]; + [self.sdrPerformanceWorkaroundSwitch setEnabled:NO]; + } else { [self.fullColorRangeSwitch setEnabled:YES]; [self.yuv444Switch setEnabled:YES];