crash fixes

This commit is contained in:
True Zhuanjia
2026-02-11 18:54:45 +08:00
parent fdf2548fe3
commit 44123c74d9
2 changed files with 4 additions and 3 deletions
@@ -1229,8 +1229,8 @@ static NSMutableSet* hostList;
// Enable frame pacing mode selector only if not in stream view AND not in performance mode
BOOL shouldEnableFramePacing = !_settingsExpandedInStreamView && (settingsViewController.renderingBackendSelector.selectedSegmentIndex != RENDER_METAL);
[settingsViewController.framePacingModeSelector setEnabled:shouldEnableFramePacing];
[settingsViewController.frameTimebaseSwitch setEnabled:shouldEnableFramePacing];
[settingsViewController.asyncFrameDequeueSwitch setEnabled:shouldEnableFramePacing];
// [settingsViewController.frameTimebaseSwitch setEnabled:shouldEnableFramePacing];
// [settingsViewController.asyncFrameDequeueSwitch setEnabled:shouldEnableFramePacing];
// Disable mic switch if sunshine does not support mic redirection
[settingsViewController.redirectMicSwitch setEnabled:!_settingsExpandedInStreamView||streamFrameViewController.micStreamInitialized];
@@ -2342,7 +2342,7 @@ BOOL isCustomResolution(int resolutionSelected) {
// Hide frame queue size for Off and Legacy modes
[self setHidden:(sender.selectedSegmentIndex == FramePacingModeOff || sender.selectedSegmentIndex == FramePacingModeLegacy) forStack:self.frameQueueSizeStack];
// [self setHidden:(sender.selectedSegmentIndex != FramePacingModeQueue) forStack:self.frameTimebaseStack];
[self setHidden:(sender.selectedSegmentIndex != FramePacingModeQueue) forStack:self.asyncFrameDequeueStack];
// [self setHidden:(sender.selectedSegmentIndex != FramePacingModeQueue) forStack:self.asyncFrameDequeueStack];
if(sender.selectedSegmentIndex == FramePacingModeOff || sender.selectedSegmentIndex == FramePacingModeLegacy){
[self.enableGraphsSwitch setOn:NO];
@@ -2922,6 +2922,7 @@ BOOL isCustomResolution(int resolutionSelected) {
- (void)setHidden:(BOOL)hidden forStack:(UIStackView* )stack{
// CGFloat previousSpacing = stack.spacing;
if(!stack) return;
if(hidden){
stack.hidden = YES;
[self->hiddenStacks addObject:stack];