diff --git a/VoidLink/Input/OnScreenWidgetView.swift b/VoidLink/Input/OnScreenWidgetView.swift index ba022246..ed94cd3f 100644 --- a/VoidLink/Input/OnScreenWidgetView.swift +++ b/VoidLink/Input/OnScreenWidgetView.swift @@ -105,6 +105,8 @@ import ObjectiveC.runtime @objc public var comboButtonStrings: [String] = [] private var comboKeyTimeIntervalMs: UInt32 = 0 + @objc public var temporarilyStoredHidden: Bool = false + @objc public var logicallyDown: Bool = false @objc public var isOverlappingWithTrashcan: Bool = false @@ -3936,6 +3938,19 @@ import ObjectiveC.runtime return parents } + @objc static func temporaryHideAll() { + for widget in OnScreenWidgetView.mapping.values where !(widget.isFolder && widget.parentSequence == -1){ + widget.temporarilyStoredHidden = widget.isHidden + widget.isHidden = true + } + } + + @objc static func restoreFromTemporaryHideAll() { + for widget in OnScreenWidgetView.mapping.values where !(widget.isFolder && widget.parentSequence == -1){ + widget.isHidden = widget.temporarilyStoredHidden + } + } + private func hasUnfoldedSubfolders() -> Bool { for sequence in self.sequenceSet { guard let widget = OnScreenWidgetView.mapping[sequence] else {continue} diff --git a/VoidLink/Input/StreamView.m b/VoidLink/Input/StreamView.m index f61e2c5a..4f2f7bc4 100644 --- a/VoidLink/Input/StreamView.m +++ b/VoidLink/Input/StreamView.m @@ -315,6 +315,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5; [self liftMetalVideoViewIfNeeded:HeightViewLiftedTo]; [self refreshKeyboardToggleRecognizer:settings.keyboardToggleFingers.intValue]; + if(keyboardToggleTip.superview && !keyboardToggleTip.hidden) [OnScreenWidgetView restoreFromTemporaryHideAll]; [keyboardToggleTip removeFromSuperview]; } NSLog(@"keyboard will show %f", CACurrentMediaTime()); @@ -324,6 +325,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5; dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)); dispatch_after(delayTime, dispatch_get_main_queue(), ^{// Code to execute after the delay if(!self->dockedKeyboardActionDetected){ + if(self->keyboardToggleTip.superview && !self->keyboardToggleTip.hidden) [OnScreenWidgetView restoreFromTemporaryHideAll]; [self->keyboardToggleTip removeFromSuperview]; if(!self->isInputingText) [self keyboardWillHide]; [self refreshKeyboardToggleRecognizer:self->settings.keyboardToggleFingers.intValue]; @@ -429,7 +431,12 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5; NSLog(@"change num of fingers required"); [self refreshKeyboardToggleRecognizer:1]; keyboardToggleTip.translatesAutoresizingMaskIntoConstraints = NO; - NSLog(@"tip obj: %@", keyboardToggleTip); + + dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)); + dispatch_after(delayTime, dispatch_get_main_queue(), ^{// Code to execute after the delay + [OnScreenWidgetView temporaryHideAll]; + }); + [self addSubview:keyboardToggleTip]; [NSLayoutConstraint activateConstraints:@[ [keyboardToggleTip.centerXAnchor constraintEqualToAnchor:self.centerXAnchor constant:0], @@ -447,7 +454,9 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5; if (isInputingText) { Log(LOG_D, @"Closing the keyboard"); [keyInputField resignFirstResponder]; + if(self->keyboardToggleTip.superview && !self->keyboardToggleTip.hidden) [OnScreenWidgetView restoreFromTemporaryHideAll]; [keyboardToggleTip removeFromSuperview]; + [OnScreenWidgetView restoreFromTemporaryHideAll]; } else { Log(LOG_D, @"Opening the keyboard"); [self addSubview:keyInputField]; diff --git a/VoidLink/Localization/Localizable.xcstrings b/VoidLink/Localization/Localizable.xcstrings index 5201f165..d9c0ba50 100644 --- a/VoidLink/Localization/Localizable.xcstrings +++ b/VoidLink/Localization/Localizable.xcstrings @@ -8376,7 +8376,7 @@ "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "为全能型方案编辑游戏布局的最佳方法:\n\n- 当前布局层级较多, 建议从在其他配置文件中编辑游戏布局。\n- 完成后,展开当前控件夹\n- 点“清空” 移除子控件\n- 点“导入”并选择已编辑好的目标配置文件\n- 选中配置的布局将导入到当前控件夹中\n(自动过滤”控件菜单”, “切换布局”, “修改布局”按键)" + "value" : "为全能型方案编辑游戏布局的最佳方法:\n\n- 当前布局层级较多, 建议先在其他配置文件中编辑游戏布局。\n- 完成后,展开当前控件夹\n- 点“清空” 移除子控件\n- 点“导入”并选择已编辑好的目标配置文件\n- 选中配置的布局将导入到当前控件夹中\n(App自动过滤”控件菜单”, “切换布局”, “修改布局”按键)" } }, "zh-Hant" : { @@ -9805,19 +9805,19 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Legacy Frame Pacing and No Frame Pacing modes may reduce streaming performance or cause frequent jitter and stuttering. These modes are intended only for the rare cases where the streamed image exhibits color corruption.\n\nTap OK to continue.\nTap Cancel to return to Queue Buffering mode." + "value" : "Legacy Frame Pacing and No Frame Pacing modes may reduce streaming performance or cause frequent jitter and stuttering, and do not support screen-off keep-alive or background streaming without Picture-in-Picture. These modes are intended only for the rare cases where the streamed image exhibits color corruption.\n\nTap [Confirm] to continue.\nTap [Cancel] to return to Queue Buffering mode." } }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", - "value" : "传统帧步进、无帧步进模式将导致串流性能衰减,或频繁的画面抖动和卡顿,仅适用于串流画面出现颜色异常的极少数情况。\n\n点【确定】以继续。\n点【取消】返回队列缓冲模式。" + "state" : "translated", + "value" : "传统帧步进、无帧步进模式将导致串流性能衰减,或频繁的画面抖动和卡顿,且不支持熄屏保持以及无画中画的后台串流,仅适用于串流画面出现颜色异常的极少数情况。\n\n点【确定】以继续。\n点【取消】返回队列缓冲模式。" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "傳統影格步調、無影格步調模式可能導致串流效能下降,或頻繁發生畫面抖動與卡頓,僅適用於極少數串流畫面出現色彩異常的情況。\n\n點選【確定】以繼續。\n點選【取消】返回佇列緩衝模式。" + "state" : "translated", + "value" : "傳統影格步調、無影格步調模式可能導致串流效能下降,或頻繁發生畫面抖動與卡頓,且不支援熄屏保持及無子母畫面的背景串流,僅適用於極少數串流畫面出現色彩異常的情況。\n\n點選【確定】以繼續。\n點選【取消】返回佇列緩衝模式。" } }, "zh-HK" : { diff --git a/VoidLink/ViewControllers/StreamFrameViewController.m b/VoidLink/ViewControllers/StreamFrameViewController.m index 0f6b03d6..e224d0ea 100644 --- a/VoidLink/ViewControllers/StreamFrameViewController.m +++ b/VoidLink/ViewControllers/StreamFrameViewController.m @@ -1432,7 +1432,7 @@ static NSString* VLTerminationHintForErrorCode(int errorCode) { - (void)applicationWillResignActive:(NSNotification *)notification { //[self.pipController startPictureInPicture]; //sleep(1); - appDidEnterBackgroundWithoutPip = true; + if(_settings.framePacingMode.intValue == FramePacingModeQueue) appDidEnterBackgroundWithoutPip = true; NSLog(@"applicationWillResignActive %f", CACurrentMediaTime()); [_streamView saveStreamingGameProfileChanges];