diff --git a/VoidLink/Base.lproj/iPad.storyboard b/VoidLink/Base.lproj/iPad.storyboard index 5a849bcc..38f26e7f 100644 --- a/VoidLink/Base.lproj/iPad.storyboard +++ b/VoidLink/Base.lproj/iPad.storyboard @@ -1121,8 +1121,8 @@ - - + + @@ -2257,7 +2257,7 @@ - + @@ -3172,7 +3172,7 @@ - + @@ -3181,13 +3181,13 @@ - + - + - + diff --git a/VoidLink/Base.lproj/iPhone.storyboard b/VoidLink/Base.lproj/iPhone.storyboard index 8c90783f..66abbfdc 100644 --- a/VoidLink/Base.lproj/iPhone.storyboard +++ b/VoidLink/Base.lproj/iPhone.storyboard @@ -2007,8 +2007,8 @@ - - + + @@ -3106,19 +3106,19 @@ - + - + - + - + diff --git a/VoidLink/Localization/Localizable.xcstrings b/VoidLink/Localization/Localizable.xcstrings index 68dcb42e..53f16dab 100644 --- a/VoidLink/Localization/Localizable.xcstrings +++ b/VoidLink/Localization/Localizable.xcstrings @@ -3860,12 +3860,41 @@ }, "zh-HK" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "- 關閉「手柄」選單分區的 DS4 陀螺儀映射後,方可將陀螺儀直接映射為手柄或滑鼠。\n\n- 「體感控制」選單分區的所有設定皆儲存在螢幕顯示小工具配置中,可在右邊緣滑出的工具箱選單中切換。\n\n- 體感控制陀螺儀可由手把按鍵或螢幕顯示按鍵開關。" } } } }, + "metalRenderTip" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Hold up! \n\n- Standard render has better performance on most devices now.\n\n- Changing the rendering mode requires restarting the application to ensure a clean start.\n\n- Metal rendering is an experimental feature that may cause performance degradation on some devices.\n\n- Metal render currently is unable to handle HDR content correctly on most devices.\n\n- Metal rendering mode does not support PiP.\n\n- Tapping “Quit Now” means I acknowledge the above information." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "等等!\n\n- 标准渲染模式目前在大多数设备上具有更好的性能。\n\n- 切换渲染模式需要重启应用程序,以确保一次干净的启动。\n\n- Metal 渲染是一项实验性功能,在某些设备上可能会导致性能下降。\n\n- Metal 渲染模式下不支持画中画。\n\n- 目前 Metal 渲染器在大多数设备上无法正确处理 HDR 内容。\n\n点击“立即退出”表示我已知晓并认可以上信息。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "等等!\n\n- 目前在大多数装置上,標準渲染模式具有较佳的效能。\n\n- 变更渲染模式需要重新启动应用程式,以确保干净的启动流程。\n\n- Metal 渲染为实验性功能,可能在某些装置上造成效能下降。\n\n- Metal 渲染模式下不支援画中画。\n\n- Metal 渲染器目前在大多数装置上无法正确处理 HDR 内容。\n\n点选「立即结束」表示我已了解并同意上述说明。" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "等等!\n\n- 目前在大多数装置上,標準渲染模式具有较佳的效能。\n\n- 变更渲染模式需要重新启动应用程式,以确保干净的启动流程。\n\n- Metal 渲染为实验性功能,可能在某些装置上造成效能下降。\n\n- Metal 渲染模式下不支援画中画。\n\n- Metal 渲染器目前在大多数装置上无法正确处理 HDR 内容。\n\n点选「立即结束」表示我已了解并同意上述说明。" + } + } + } + }, "micPermissionTip" : { "extractionState" : "manual", "localizations" : { @@ -5056,35 +5085,6 @@ } } }, - "PerfModeTip" : { - "extractionState" : "manual", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "- Changing the rendering mode requires restarting the application to ensure a clean start.\n\n- Performance mode is an experimental feature and cannot guarantee a positive impact on the streaming experience.\n\n- HDR under performance mode for devices of limited dynamic range like iPad mini(LCD display) could be broken.\n\n- Tapping “Quit Now” means I acknowledge the above information." - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "- 更改渲染模式需要重启应用以确保干净启动。\n\n- 性能模式为实验性功能,无法保证开启后对串流体验产生正向优化。 \n\n- 有限动态范围设备,如采用LCD的iPad mini,开启性能模式后可能无法正常显示HDR画面。\n\n- 点击“立即退出”代表我已知悉以上内容。" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "- 更改渲染模式需要重新啟動應用程式以確保乾淨啟動。\n\n- 效能模式為實驗性功能,無法保證開啟後對串流體驗產生正向優化。\n\n- 有限動態範圍裝置,如採用 LCD 的 iPad mini,開啟效能模式後可能無法正常顯示 HDR 畫面。\n\n- 點擊「立即退出」代表我已知悉以上內容。" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "- 更改渲染模式需要重新啟動應用程式以確保乾淨啟動。\n\n- 效能模式為實驗性功能,無法保證開啟後對串流體驗產生正向優化。\n\n- 有限動態範圍裝置,如採用 LCD 的 iPad mini,開啟效能模式後可能無法正常顯示 HDR 畫面。\n\n- 點擊「立即退出」代表我已知悉以上內容。" - } - } - } - }, "Performance" : { "extractionState" : "manual", "localizations" : { @@ -6169,25 +6169,25 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Performance rendering mode [may] handle higher bitrate with lower latency, the battery usage can be higher and PiP is not supported in this mode. Use balanced mode when issues occurred." + "value" : "- Standard render has better performance on most devices now.\n\n- Changing the rendering mode requires restarting the application to ensure a clean start.\n\n- Metal rendering is an experimental feature that may cause performance degradation on some devices.\n\n- Metal render currently is unable to handle HDR content correctly on most devices.\n\n- Metal rendering mode does not support PiP." } }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", - "value" : "性能渲染模式 [或可] 以更低的延迟处理更高的比特率,但电池消耗可能更高,且该模式不支持画中画。如遇到问题请使用平衡模式。" + "state" : "translated", + "value" : "- 目前, 标准渲染模式在大多数设备上具有更好的性能。\n\n- 切换渲染模式需要重启应用程序,以确保一次干净的启动。\n\n- Metal 渲染是一项实验性功能,在某些设备上可能会导致性能下降。\n\n- Metal 渲染模式下不支持画中画。\n\n- 目前 Metal 渲染器在大多数设备上无法正确处理 HDR 内容。\n" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "效能渲染模式 [或可] 以更低的延遲處理更高的位元速率,但電池消耗可能更高,且該模式不支援子母畫面。如遇到問題請使用平衡模式。" + "state" : "translated", + "value" : "- 目前,在大多数装置上,標準渲染模式具有较佳的效能。\n\n- 变更渲染模式需要重新启动应用程式,以确保干净的启动流程。\n\n- Metal 渲染为实验性功能,可能在某些装置上造成效能下降。\n\n- Metal 渲染模式下不支援画中画。\n\n- Metal 渲染器目前在大多数装置上无法正确处理 HDR 内容。" } }, "zh-HK" : { "stringUnit" : { - "state" : "needs_review", - "value" : "效能渲染模式 [或可] 以更低的延遲處理更高的位元速率,但電池消耗可能更高,且該模式不支援子母畫面。如遇到問題請使用平衡模式。" + "state" : "translated", + "value" : "- 目前,在大多数装置上,標準渲染模式具有较佳的效能。\n\n- 变更渲染模式需要重新启动应用程式,以确保干净的启动流程。\n\n- Metal 渲染为实验性功能,可能在某些装置上造成效能下降。\n\n- Metal 渲染模式下不支援画中画。\n\n- Metal 渲染器目前在大多数装置上无法正确处理 HDR 内容。" } } } diff --git a/VoidLink/Stream/VideoDecoderRenderer.m b/VoidLink/Stream/VideoDecoderRenderer.m index b3ad5644..aabc6145 100644 --- a/VoidLink/Stream/VideoDecoderRenderer.m +++ b/VoidLink/Stream/VideoDecoderRenderer.m @@ -288,7 +288,7 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit); // previousLinkTime = current; CFTimeInterval start = link.timestamp; - CFTimeInterval nextFrameTime = link.targetTimestamp; + CFTimeInterval targetTime = link.targetTimestamp; static CFTimeInterval lastTargetLocal = 0.0f; CFTimeInterval dl0 = CACurrentMediaTime(); @@ -302,7 +302,7 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit); [self checkDisplayLayer]; - CFTimeInterval waitFor = nextFrameTime - dl0; + CFTimeInterval waitFor = targetTime - dl0; if (waitFor < 0.001f) { waitFor = isIPhone ? waitFor : 0.0f; @@ -315,7 +315,7 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit); [_frameQueue dequeueWithTimeout:waitFor completion:^(Frame *frame) { if (frame) { // LogOnce(LOG_I, @"Frame pacing: using AVSampleBufferDisplayLayer target %f Hz with %d FPS stream", 1.0f / (deadline - start), self->_frameRate); - [self renderFrame:frame atTime:CMTimeMakeWithSeconds(nextFrameTime, NSEC_PER_SEC)]; + [self renderFrame:frame atTime:CMTimeMakeWithSeconds(targetTime, NSEC_PER_SEC)]; } }]; } @@ -328,7 +328,7 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit); // The system works best with properly timed video frames, which we time to the end of the next vsync period, // the earliest they can be displayed due to double-buffering. - CFTimeInterval targetLocal = nextFrameTime; + CFTimeInterval targetLocal = targetTime; [self renderFrame:frame atTime:CMTimeMakeWithSeconds(targetLocal, NSEC_PER_SEC)]; @@ -340,7 +340,7 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit); // Update metrics if (lastTargetLocal != 0) { CFTimeInterval frametime = targetLocal - lastTargetLocal; - if (frametime > nextFrameTime - start + 0.0005f) { + if (frametime > targetTime - start + 0.0005f) { // we missed a callback // Log(LOG_W, @"*** slow frametime %.3f ms", frametime * 1000.0); } diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index 50199c87..3eab383a 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -2282,7 +2282,7 @@ BOOL isCustomResolution(int resolutionSelected) { // Check if the rendering backend has actually changed if (previousBackend != sender.selectedSegmentIndex) { // Show alert to prompt user to restart the app - NSString *message = [LocalizationHelper localizedStringForKey: sender.selectedSegmentIndex == 1 ? @"PerfModeTip" : @"Rendering mode change requires app restart"]; + NSString *message = [LocalizationHelper localizedStringForKey: sender.selectedSegmentIndex == 1 ? @"metalRenderTip" : @"Rendering mode change requires app restart"]; UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Restart Required"] message:message @@ -2303,8 +2303,7 @@ BOOL isCustomResolution(int resolutionSelected) { UIAlertAction *laterAction = [UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Later"] style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { - // Save settings immediately to persist the renderer change - [self saveSettings]; + self.renderingBackendSelector.selectedSegmentIndex = labs(self.renderingBackendSelector.selectedSegmentIndex - 1); }]; [alertController addAction:laterAction]; diff --git a/VoidLink/mul.lproj/iPad.xcstrings b/VoidLink/mul.lproj/iPad.xcstrings index dcf37ecc..ada84757 100644 --- a/VoidLink/mul.lproj/iPad.xcstrings +++ b/VoidLink/mul.lproj/iPad.xcstrings @@ -25,7 +25,7 @@ }, "zh-HK" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "異步多點觸控" } } @@ -680,61 +680,61 @@ } }, "53H-ST-OtY.segmentTitles[0]" : { - "comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[0] = \"Balanced\"; ObjectID = \"53H-ST-OtY\";", + "comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[0] = \"Standard\"; ObjectID = \"53H-ST-OtY\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Balanced" + "value" : "Standard" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "平衡" + "value" : "标准" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "平衡" + "value" : "標準" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "平衡" + "value" : "標準" } } } }, "53H-ST-OtY.segmentTitles[1]" : { - "comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[1] = \"Performance\"; ObjectID = \"53H-ST-OtY\";", + "comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[1] = \"Metal\"; ObjectID = \"53H-ST-OtY\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Performance" + "value" : "Metal" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "性能" + "value" : "Metal" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "效能" + "value" : "Metal" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "效能" + "value" : "Metal" } } } @@ -1471,7 +1471,7 @@ }, "zh-HK" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "匯出所有" } } @@ -5695,7 +5695,7 @@ }, "zh-HK" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "非同步取幀" } } diff --git a/VoidLink/mul.lproj/iPhone.xcstrings b/VoidLink/mul.lproj/iPhone.xcstrings index 24ddf9a7..a483c2ab 100644 --- a/VoidLink/mul.lproj/iPhone.xcstrings +++ b/VoidLink/mul.lproj/iPhone.xcstrings @@ -980,61 +980,61 @@ } }, "53H-ST-OtY.segmentTitles[0]" : { - "comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[0] = \"Balanced\"; ObjectID = \"53H-ST-OtY\";", + "comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[0] = \"Standard\"; ObjectID = \"53H-ST-OtY\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Balanced" + "value" : "Standard" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "平衡" + "value" : "标准" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "平衡" + "value" : "標準" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "平衡" + "value" : "標準" } } } }, "53H-ST-OtY.segmentTitles[1]" : { - "comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[1] = \"Performance\"; ObjectID = \"53H-ST-OtY\";", + "comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[1] = \"Metal\"; ObjectID = \"53H-ST-OtY\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Performance" + "value" : "Metal" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "性能" + "value" : "Metal" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "效能" + "value" : "Metal" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "效能" + "value" : "Metal" } } }