Merge remote-tracking branch 'upstream/Integration' into feat/frame_pacing_metal

# Conflicts:
#	VoidLink/Base.lproj/iPad.storyboard
#	VoidLink/Database/DataManager.h
#	VoidLink/Database/DataManager.m
#	VoidLink/Database/TemporarySettings.m
#	VoidLink/ViewControllers/MainFrameViewController.m
#	VoidLink/ViewControllers/SettingsViewController.h
#	VoidLink/ViewControllers/SettingsViewController.m
#	VoidLink/ViewControllers/StreamFrameViewController.m
This commit is contained in:
Acaki committed 2025-07-13 01:01:51 +08:00
commit 46526603cc
14 files changed
+228 -44

No files matched your search

+25 -3
View File
@@ -60,7 +60,7 @@
<viewControllerLayoutGuide type="bottom" id="XvO-F3-j4u"/> <viewControllerLayoutGuide type="bottom" id="XvO-F3-j4u"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="WRy-3f-gEP" customClass="UIScrollView"> <view key="view" contentMode="scaleToFill" id="WRy-3f-gEP" customClass="UIScrollView">
<rect key="frame" x="0.0" y="0.0" width="682" height="2500"/> <rect key="frame" x="0.0" y="0.0" width="2000" height="2500"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="zpX-lo-MLA" userLabel="Resolutionstak"> <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="zpX-lo-MLA" userLabel="Resolutionstak">
@@ -969,16 +969,38 @@
<constraint firstAttribute="width" constant="380" id="3hg-AM-9mr"/> <constraint firstAttribute="width" constant="380" id="3hg-AM-9mr"/>
</constraints> </constraints>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" id="z5W-q6-Y1z" userLabel="backgroundSessionTimerStack">
<rect key="frame" x="440" y="2421" width="380" height="55.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Background Session" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9pX-93-bC2" userLabel="backgroundSessionTimerLabel">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
<color key="tintColor" red="0.81533776120000001" green="0.85979419950000002" blue="0.91372549020000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<slider opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="61" minValue="0.0" maxValue="61" translatesAutoresizingMaskIntoConstraints="NO" id="lRU-fd-AsU">
<rect key="frame" x="-2" y="25.5" width="384" height="31"/>
<color key="tintColor" systemColor="linkColor"/>
</slider>
</subviews>
<constraints>
<constraint firstAttribute="width" constant="380" id="dB2-bt-l6n"/>
</constraints>
</stackView>
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view> </view>
<size key="freeformSize" width="682" height="2500"/> <size key="freeformSize" width="2000" height="2500"/>
<connections> <connections>
<outlet property="HdrStack" destination="dH7-Sy-EdJ" id="cJm-bj-Aqo"/> <outlet property="HdrStack" destination="dH7-Sy-EdJ" id="cJm-bj-Aqo"/>
<outlet property="audioConfigSelector" destination="iZL-dA-jk9" id="Yja-os-o6g"/> <outlet property="audioConfigSelector" destination="iZL-dA-jk9" id="Yja-os-o6g"/>
<outlet property="audioConfigStack" destination="qnG-5F-2YY" id="kFX-VK-vuK"/> <outlet property="audioConfigStack" destination="qnG-5F-2YY" id="kFX-VK-vuK"/>
<outlet property="audioOnPcStack" destination="Bbr-Wj-Z75" id="c2K-3R-whg"/> <outlet property="audioOnPcStack" destination="Bbr-Wj-Z75" id="c2K-3R-whg"/>
<outlet property="audioOnPcSwitch" destination="81a-Jw-eV9" id="Oig-tg-V1I"/> <outlet property="audioOnPcSwitch" destination="81a-Jw-eV9" id="Oig-tg-V1I"/>
<outlet property="backgroundSessionTimerSlider" destination="lRU-fd-AsU" id="oRL-1o-xNh"/>
<outlet property="backgroundSessionTimerStack" destination="z5W-q6-Y1z" id="2MJ-Y7-uui"/>
<outlet property="bitrateLabel" destination="lMt-4H-fkV" id="mpE-bW-R48"/> <outlet property="bitrateLabel" destination="lMt-4H-fkV" id="mpE-bW-R48"/>
<outlet property="bitrateSlider" destination="JAY-nj-UNz" id="fHd-v5-9Vo"/> <outlet property="bitrateSlider" destination="JAY-nj-UNz" id="fHd-v5-9Vo"/>
<outlet property="bitrateStack" destination="2cV-yC-0QL" id="eHB-kH-hoF"/> <outlet property="bitrateStack" destination="2cV-yC-0QL" id="eHB-kH-hoF"/>
@@ -1076,7 +1098,7 @@
</items> </items>
</navigationBar> </navigationBar>
</objects> </objects>
<point key="canvasLocation" x="536.69064748201447" y="1215.3719008264463"/> <point key="canvasLocation" x="-383.45323741007195" y="1500"/>
</scene> </scene>
<!--Reveal View Controller--> <!--Reveal View Controller-->
<scene sceneID="rR7-ZT-bc7"> <scene sceneID="rR7-ZT-bc7">
+21
View File
@@ -1541,6 +1541,25 @@
</switch> </switch>
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="9eE-iu-W90" userLabel="backgroundSessionTimerStack">
<rect key="frame" x="437" y="1318" width="380" height="55.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Background Session" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9et-1g-y3D" userLabel="backgroundSessionTimerLabel">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
<color key="tintColor" red="0.81533776120000001" green="0.85979419950000002" blue="0.91372549020000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="61" minValue="0.0" maxValue="61" translatesAutoresizingMaskIntoConstraints="NO" id="0bT-5d-w7S">
<rect key="frame" x="-2" y="25.5" width="384" height="31"/>
<color key="tintColor" systemColor="linkColor"/>
</slider>
</subviews>
<constraints>
<constraint firstAttribute="width" constant="380" id="fjm-Ch-JrJ"/>
</constraints>
</stackView>
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view> </view>
@@ -1551,6 +1570,8 @@
<outlet property="audioConfigStack" destination="Rld-CY-qzs" id="dmf-m8-sor"/> <outlet property="audioConfigStack" destination="Rld-CY-qzs" id="dmf-m8-sor"/>
<outlet property="audioOnPcStack" destination="aud-Zf-37T" id="58Y-ri-ILs"/> <outlet property="audioOnPcStack" destination="aud-Zf-37T" id="58Y-ri-ILs"/>
<outlet property="audioOnPcSwitch" destination="4Ne-Pn-gnL" id="gae-We-5ih"/> <outlet property="audioOnPcSwitch" destination="4Ne-Pn-gnL" id="gae-We-5ih"/>
<outlet property="backgroundSessionTimerSlider" destination="0bT-5d-w7S" id="soA-ry-tzx"/>
<outlet property="backgroundSessionTimerStack" destination="9eE-iu-W90" id="64C-Ku-xG9"/>
<outlet property="bitrateLabel" destination="HvT-Ek-DAx" id="qf7-hv-8EG"/> <outlet property="bitrateLabel" destination="HvT-Ek-DAx" id="qf7-hv-8EG"/>
<outlet property="bitrateSlider" destination="XZQ-na-T3z" id="pnz-sg-lgB"/> <outlet property="bitrateSlider" destination="XZQ-na-T3z" id="pnz-sg-lgB"/>
<outlet property="bitrateStack" destination="pPC-vs-DwV" id="aNz-Fm-OFh"/> <outlet property="bitrateStack" destination="pPC-vs-DwV" id="aNz-Fm-OFh"/>
+2
View File
@@ -79,6 +79,7 @@ typedef NS_ENUM(NSInteger, SettingsMenuMode) {
useFramePacing:(BOOL)useFramePacing useFramePacing:(BOOL)useFramePacing
enableHdr:(BOOL)enableHdr enableHdr:(BOOL)enableHdr
btMouseSupport:(BOOL)btMouseSupport btMouseSupport:(BOOL)btMouseSupport
// absoluteTouchMode:(BOOL)absoluteTouchMode
touchMode:(NSInteger)touchMode touchMode:(NSInteger)touchMode
statsOverlayLevel:(NSInteger)statsOverlayLevel statsOverlayLevel:(NSInteger)statsOverlayLevel
statsOverlayEnabled:(BOOL)statsOverlayEnabled statsOverlayEnabled:(BOOL)statsOverlayEnabled
@@ -90,6 +91,7 @@ typedef NS_ENUM(NSInteger, SettingsMenuMode) {
enableGraphs:(BOOL)enableGraphs enableGraphs:(BOOL)enableGraphs
graphOpacity:(NSInteger)graphOpacity graphOpacity:(NSInteger)graphOpacity
renderingBackend:(NSInteger)renderingBackend; renderingBackend:(NSInteger)renderingBackend;
backgroundSessionTimer:(NSInteger)backgroundSessionTimer;
- (NSArray*) getHosts; - (NSArray*) getHosts;
- (void) updateHost:(TemporaryHost*)host; - (void) updateHost:(TemporaryHost*)host;
+3 -1
View File
@@ -97,7 +97,8 @@
enableGraphs:(BOOL)enableGraphs enableGraphs:(BOOL)enableGraphs
graphOpacity:(NSInteger)graphOpacity graphOpacity:(NSInteger)graphOpacity
renderingBackend:(NSInteger)renderingBackend renderingBackend:(NSInteger)renderingBackend
{ backgroundSessionTimer:(NSInteger)backgroundSessionTimer{
[_managedObjectContext performBlockAndWait:^{ [_managedObjectContext performBlockAndWait:^{
Settings* settingsToSave = [self retrieveSettings]; Settings* settingsToSave = [self retrieveSettings];
settingsToSave.framerate = [NSNumber numberWithInteger:framerate]; settingsToSave.framerate = [NSNumber numberWithInteger:framerate];
@@ -137,6 +138,7 @@
settingsToSave.resolutionSelected = [NSNumber numberWithInteger:resolutionSelected]; settingsToSave.resolutionSelected = [NSNumber numberWithInteger:resolutionSelected];
settingsToSave.externalDisplayMode = [NSNumber numberWithInteger:externalDisplayMode]; settingsToSave.externalDisplayMode = [NSNumber numberWithInteger:externalDisplayMode];
settingsToSave.localMousePointerMode = [NSNumber numberWithInteger:localMousePointerMode]; settingsToSave.localMousePointerMode = [NSNumber numberWithInteger:localMousePointerMode];
settingsToSave.backroundSessionTimer = [NSNumber numberWithInteger:backgroundSessionTimer];
settingsToSave.frameQueueSize = [NSNumber numberWithInteger:frameQueueSize]; settingsToSave.frameQueueSize = [NSNumber numberWithInteger:frameQueueSize];
settingsToSave.enableGraphs = enableGraphs; settingsToSave.enableGraphs = enableGraphs;
+1
View File
@@ -39,6 +39,7 @@
@property (nonatomic, retain) NSNumber * resolutionSelected; @property (nonatomic, retain) NSNumber * resolutionSelected;
@property (nonatomic, retain) NSNumber * externalDisplayMode; @property (nonatomic, retain) NSNumber * externalDisplayMode;
@property (nonatomic, retain) NSNumber * localMousePointerMode; @property (nonatomic, retain) NSNumber * localMousePointerMode;
@property (nonatomic, retain) NSNumber * backgroundSessionTimer;
@property (nonatomic) enum { @property (nonatomic) enum {
CODEC_PREF_AUTO, CODEC_PREF_AUTO,
CODEC_PREF_H264, CODEC_PREF_H264,
+1
View File
@@ -120,6 +120,7 @@
self.enableGraphs = settings.enableGraphs; self.enableGraphs = settings.enableGraphs;
self.graphOpacity = settings.graphOpacity; self.graphOpacity = settings.graphOpacity;
self.renderingBackend = settings.renderingBackend; self.renderingBackend = settings.renderingBackend;
self.backgroundSessionTimer = settings.backroundSessionTimer;
#endif #endif
self.uniqueId = settings.uniqueId; self.uniqueId = settings.uniqueId;
@@ -23,12 +23,13 @@
<entity name="Settings" representedClassName="Settings" syncable="YES" codeGenerationType="class"> <entity name="Settings" representedClassName="Settings" syncable="YES" codeGenerationType="class">
<attribute name="asyncNativeTouchPriority" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> <attribute name="asyncNativeTouchPriority" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
<attribute name="audioConfig" attributeType="Integer 32" defaultValueString="2" usesScalarValueType="NO" syncable="YES"/> <attribute name="audioConfig" attributeType="Integer 32" defaultValueString="2" usesScalarValueType="NO" syncable="YES"/>
<attribute name="backroundSessionTimer" optional="YES" attributeType="Integer 32" defaultValueString="32767" usesScalarValueType="NO" syncable="YES"/>
<attribute name="bitrate" attributeType="Integer 32" defaultValueString="10000" usesScalarValueType="NO" syncable="YES"/> <attribute name="bitrate" attributeType="Integer 32" defaultValueString="10000" usesScalarValueType="NO" syncable="YES"/>
<attribute name="btMouseSupport" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="btMouseSupport" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="deviceGyroMode" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> <attribute name="deviceGyroMode" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
<attribute name="enableGraphs" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="enableGraphs" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="enableHdr" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="enableHdr" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="enablePIP" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="enablePIP" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
<attribute name="enableYUV444" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="enableYUV444" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="externalDisplayMode" optional="YES" attributeType="Integer 16" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/> <attribute name="externalDisplayMode" optional="YES" attributeType="Integer 16" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
<attribute name="frameQueueSize" optional="YES" attributeType="Integer 32" defaultValueString="2" usesScalarValueType="NO" syncable="YES"/> <attribute name="frameQueueSize" optional="YES" attributeType="Integer 32" defaultValueString="2" usesScalarValueType="NO" syncable="YES"/>
@@ -47,6 +47,75 @@
} }
} }
}, },
" disconnect " : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : " 断开 "
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : " 斷開 "
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : " 斷開 "
}
}
}
},
" keep %d min " : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : " 保持%d分钟 "
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : " 保持%d分鐘 "
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : " 保持%d分鐘 "
}
}
}
},
" keep alive " : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : " 保活 "
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : " 保持連線 "
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : " 保持連線 "
}
}
}
},
" Launch" : { " Launch" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@@ -74,6 +74,7 @@
SettingsViewController* settingsViewController; SettingsViewController* settingsViewController;
StreamFrameViewController* streamFrameViewController; StreamFrameViewController* streamFrameViewController;
id navBarAppearanceStandard; id navBarAppearanceStandard;
bool _viewJustAppeared;
NSTimer *_foregroundHostUpdateTimer; NSTimer *_foregroundHostUpdateTimer;
@@ -1516,6 +1517,7 @@ static NSMutableSet* hostList;
// if ([hostList count] == 1) [self hostClicked:[hostList anyObject] view:nil]; // auto click for single host // if ([hostList count] == 1) [self hostClicked:[hostList anyObject] view:nil]; // auto click for single host
//if([SettingsViewController isLandscapeNow] != _streamConfig.width > _streamConfig.height) //if([SettingsViewController isLandscapeNow] != _streamConfig.width > _streamConfig.height)
//[self simulateSettingsButtonPress]; //force expand setting view if orientation changed since last quit from app. //[self simulateSettingsButtonPress]; //force expand setting view if orientation changed since last quit from app.
//[self simulateSettingsButtonPress]; //force expand setting view if orientation changed since last quit from app. //[self simulateSettingsButtonPress]; //force expand setting view if orientation changed since last quit from app.
@@ -1623,9 +1625,13 @@ static NSMutableSet* hostList;
-(void)beginForegroundRefresh -(void)beginForegroundRefresh
{ {
if (!_background) { if (!_background || _viewJustAppeared) {
// This will kick off box art caching // This will kick off box art caching
_viewJustAppeared = false;
[_foregroundHostUpdateTimer invalidate];
_foregroundHostUpdateTimer = nil;
_foregroundHostUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:5 repeats:YES block:^(NSTimer *timer) { _foregroundHostUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:5 repeats:YES block:^(NSTimer *timer) {
[self updateHosts]; [self updateHosts];
@@ -1692,6 +1698,10 @@ static NSMutableSet* hostList;
{ {
[super viewDidAppear:NO]; [super viewDidAppear:NO];
_viewJustAppeared = true;
[self beginForegroundRefresh];
// [self setupHostViewTitle]; // [self setupHostViewTitle];
// [self reloadScrollHostView]; //remove this for proper test // [self reloadScrollHostView]; //remove this for proper test
[self attachWaterMark]; [self attachWaterMark];
@@ -1772,8 +1782,6 @@ static NSMutableSet* hostList;
[self retrieveSavedHosts]; [self retrieveSavedHosts];
_discMan = [[DiscoveryManager alloc] initWithHosts:[hostList allObjects] andCallback:self]; _discMan = [[DiscoveryManager alloc] initWithHosts:[hostList allObjects] andCallback:self];
[self beginForegroundRefresh];
} }
- (void)viewDidDisappear:(BOOL)animated - (void)viewDidDisappear:(BOOL)animated
@@ -1863,26 +1871,7 @@ static NSMutableSet* hostList;
NSArray* sortedHostList = [[hostList allObjects] sortedArrayUsingSelector:@selector(compareName:)]; NSArray* sortedHostList = [[hostList allObjects] sortedArrayUsingSelector:@selector(compareName:)];
for (TemporaryHost* comp in sortedHostList) { for (TemporaryHost* comp in sortedHostList) {
if(comp.state == StateOnline || comp.pairState == PairStatePaired || comp.pairState == PairStateUnknown) [self.hostCollectionVC addHost:comp]; if(comp.state == StateOnline || comp.pairState == PairStatePaired || comp.pairState == PairStateUnknown) [self.hostCollectionVC addHost:comp];
// new host card test
// if([comp.name isEqualToString: @"ASRockPC"]) {
/*
if([comp.name isEqualToString: @"ASRockPC"]) {
//if([comp.name isEqualToString: @"PianoServer"]) {
//if([comp.name isEqualToString: @"TrueZj"]) {
HostCardView *testCard = [[HostCardView alloc] initWithHost:comp];
[self.view addSubview:testCard];
// [testCard resizeBySizeFactor:3];
[NSLayoutConstraint activateConstraints:@[
[testCard.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0],
[testCard.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:150],
]];
}*/
//
// Start jobs to decode the box art in advance // Start jobs to decode the box art in advance
for (TemporaryApp* app in comp.appList) { for (TemporaryApp* app in comp.appList) {
@@ -119,6 +119,9 @@
@property (strong, nonatomic) IBOutlet UIStepper *graphOpacityStepper; @property (strong, nonatomic) IBOutlet UIStepper *graphOpacityStepper;
@property (strong, nonatomic) IBOutlet UISegmentedControl *renderingBackendSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *renderingBackendSelector;
@property (strong, nonatomic) IBOutlet UIStackView *backgroundSessionTimerStack;
@property (strong, nonatomic) IBOutlet UISlider *backgroundSessionTimerSlider;
#pragma clang diagnostic push #pragma clang diagnostic push
@@ -557,6 +557,7 @@ BOOL isCustomResolution(CGSize res) {
} }
[self addSetting:self.statsOverlayStack ofId:@"statsOverlayStack" withInfoTag:NO withDynamicLabel:NO to:otherSection]; [self addSetting:self.statsOverlayStack ofId:@"statsOverlayStack" withInfoTag:NO withDynamicLabel:NO to:otherSection];
[self addSetting:self.unlockDisplayOrientationStack ofId:@"unlockDisplayOrientationStack" withInfoTag:YES withDynamicLabel:NO to:otherSection]; [self addSetting:self.unlockDisplayOrientationStack ofId:@"unlockDisplayOrientationStack" withInfoTag:YES withDynamicLabel:NO to:otherSection];
[self addSetting:self.backgroundSessionTimerStack ofId:@"backgroundSessionTimerStack" withInfoTag:NO withDynamicLabel:YES to:otherSection];
[self addSetting:self.optimizeGamesStack ofId:@"optimizeGamesStack" withInfoTag:YES withDynamicLabel:NO to:otherSection]; [self addSetting:self.optimizeGamesStack ofId:@"optimizeGamesStack" withInfoTag:YES withDynamicLabel:NO to:otherSection];
[self addSetting:self.multiControllerStack ofId:@"multiControllerStack" withInfoTag:YES withDynamicLabel:NO to:otherSection]; [self addSetting:self.multiControllerStack ofId:@"multiControllerStack" withInfoTag:YES withDynamicLabel:NO to:otherSection];
[self addSetting:self.softKeyboardToolbarStack ofId:@"softKeyboardToolbarStack" withInfoTag:YES withDynamicLabel:NO to:otherSection]; [self addSetting:self.softKeyboardToolbarStack ofId:@"softKeyboardToolbarStack" withInfoTag:YES withDynamicLabel:NO to:otherSection];
@@ -1328,6 +1329,9 @@ BOOL isCustomResolution(CGSize res) {
else [self.unlockDisplayOrientationSelector setSelectedSegmentIndex:1]; // can't lock screen orientation in this mode = Display Orientation always unlocked else [self.unlockDisplayOrientationSelector setSelectedSegmentIndex:1]; // can't lock screen orientation in this mode = Display Orientation always unlocked
[self.unlockDisplayOrientationSelector setEnabled:unlockDisplayOrientationSelectorEnabled]; [self.unlockDisplayOrientationSelector setEnabled:unlockDisplayOrientationSelectorEnabled];
[self.backgroundSessionTimerSlider setValue:(uint32_t)currentSettings.backgroundSessionTimer.floatValue];
[self.backgroundSessionTimerSlider addTarget:self action:@selector(backgroundSessionTimerSliderMoved:) forControlEvents:UIControlEventValueChanged];
[self backgroundSessionTimerSliderMoved:self.backgroundSessionTimerSlider];
// lift streamview setting // lift streamview setting
[self.liftStreamViewForKeyboardSelector setSelectedSegmentIndex:currentSettings.liftStreamViewForKeyboard ? 1 : 0];// Load old setting [self.liftStreamViewForKeyboardSelector setSelectedSegmentIndex:currentSettings.liftStreamViewForKeyboard ? 1 : 0];// Load old setting
@@ -1542,6 +1546,14 @@ BOOL isCustomResolution(CGSize res) {
[self findDynamicLabelFromStack:self.gyroSensitivityStack].text = [NSString stringWithFormat:@" %d%% ", (uint16_t)sender.value]; // Update label display [self findDynamicLabelFromStack:self.gyroSensitivityStack].text = [NSString stringWithFormat:@" %d%% ", (uint16_t)sender.value]; // Update label display
} }
- (void) backgroundSessionTimerSliderMoved:(UISlider* )sender {
NSString* labelString;
labelString = [LocalizationHelper localizedStringForKey:@" keep %d min ", (uint16_t)sender.value];
if(sender.value == 0) labelString = [LocalizationHelper localizedStringForKey:@" disconnect "];
if(sender.value == sender.maximumValue) labelString = [LocalizationHelper localizedStringForKey:@" keep alive "];
[self findDynamicLabelFromStack:self.backgroundSessionTimerStack].text = labelString; // Update label display
}
// veloc factor upto 700% // veloc factor upto 700%
- (uint16_t) map_velocFactorDisplay_fromSliderValue:(CGFloat)sliderValue{ - (uint16_t) map_velocFactorDisplay_fromSliderValue:(CGFloat)sliderValue{
@@ -2024,6 +2036,7 @@ BOOL isCustomResolution(CGSize res) {
NSInteger resolutionSelected = [self.resolutionSelector selectedSegmentIndex]; NSInteger resolutionSelected = [self.resolutionSelector selectedSegmentIndex];
NSInteger externalDisplayMode = [self.externalDisplayModeSelector selectedSegmentIndex]; NSInteger externalDisplayMode = [self.externalDisplayModeSelector selectedSegmentIndex];
NSInteger localMousePointerMode = [self.localMousePointerModeSelector selectedSegmentIndex]; NSInteger localMousePointerMode = [self.localMousePointerModeSelector selectedSegmentIndex];
NSInteger backgroundSessionTimer = self.backgroundSessionTimerSlider.value == self.backgroundSessionTimerSlider.maximumValue ? (uint32_t) INT16_MAX : (uint32_t)self.backgroundSessionTimerSlider.value;
[dataMan saveSettingsWithBitrate:_bitrate [dataMan saveSettingsWithBitrate:_bitrate
framerate:framerate framerate:framerate
height:height height:height
@@ -2065,6 +2078,7 @@ BOOL isCustomResolution(CGSize res) {
enableGraphs:enableGraphs enableGraphs:enableGraphs
graphOpacity:_graphOpacity graphOpacity:_graphOpacity
renderingBackend:renderingBackend]; renderingBackend:renderingBackend];
backgroundSessionTimer:backgroundSessionTimer];
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
@@ -902,20 +902,7 @@
//[self.pipController startPictureInPicture]; //[self.pipController startPictureInPicture];
//sleep(1); //sleep(1);
if (_inactivityTimer != nil) {
[_inactivityTimer invalidate];
_inactivityTimer = nil;
}
#if !TARGET_OS_TV #if !TARGET_OS_TV
// Terminate the stream if the app is inactive for 60 seconds
Log(LOG_I, @"Starting inactivity termination timer");
_inactivityTimer = [NSTimer scheduledTimerWithTimeInterval:18000
target:self
selector:@selector(inactiveTimerExpired:)
userInfo:nil
repeats:NO];
#endif #endif
} }
@@ -928,7 +915,7 @@
} }
- (void)applicationDidBecomeActive:(NSNotification *)notification { - (void)applicationDidBecomeActive:(NSNotification *)notification {
// Stop the background timer // Stop the background timer, since we're foregrounded again
if (_inactivityTimer != nil) { if (_inactivityTimer != nil) {
Log(LOG_I, @"Stopping inactivity timer after becoming active again"); Log(LOG_I, @"Stopping inactivity timer after becoming active again");
[_inactivityTimer invalidate]; [_inactivityTimer invalidate];
@@ -952,10 +939,22 @@
NSLog(@"did enter background, %d, %@, %d", _settings.enablePIP, self.pipController, self.pipController.isPictureInPictureActive); NSLog(@"did enter background, %d, %@, %d", _settings.enablePIP, self.pipController, self.pipController.isPictureInPictureActive);
if (_settings.enablePIP && self.pipController && self.pipController.isPictureInPictureActive) { if (_settings.enablePIP && self.pipController && self.pipController.isPictureInPictureActive) {
Log(LOG_I, @"PIP is active, not terminating stream"); //Log(LOG_I, @"PIP is active, not terminating stream");
return;
} }
if (_inactivityTimer != nil) {
[_inactivityTimer invalidate];
_inactivityTimer = nil;
}
// Terminate the stream if the app is inactive for ...
Log(LOG_I, @"Starting inactivity termination timer with %d min", _settings.backgroundSessionTimer.intValue);
_inactivityTimer = [NSTimer scheduledTimerWithTimeInterval:60*(double)_settings.backgroundSessionTimer.intValue
target:self
selector:@selector(inactiveTimerExpired:)
userInfo:nil
repeats:NO];
#if !TARGET_OS_TV #if !TARGET_OS_TV
#endif #endif
+30
View File
@@ -349,6 +349,36 @@
} }
} }
}, },
"9pX-93-bC2.text" : {
"comment" : "Class = \"UILabel\"; text = \"Background Session\"; ObjectID = \"9pX-93-bC2\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Background Session"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "后台会话"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "背景執行"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "背景執行"
}
}
}
},
"9XL-xt-Q57.text" : { "9XL-xt-Q57.text" : {
"comment" : "Class = \"UILabel\"; text = \"Gyro Sensitivity\"; ObjectID = \"9XL-xt-Q57\";", "comment" : "Class = \"UILabel\"; text = \"Gyro Sensitivity\"; ObjectID = \"9XL-xt-Q57\";",
"extractionState" : "extracted_with_value", "extractionState" : "extracted_with_value",
+30
View File
@@ -727,6 +727,36 @@
} }
} }
}, },
"9et-1g-y3D.text" : {
"comment" : "Class = \"UILabel\"; text = \"Background Session\"; ObjectID = \"9et-1g-y3D\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Background Session"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "后台会话"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "背景執行"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "背景執行"
}
}
}
},
"9Gg-66-UdB.text" : { "9Gg-66-UdB.text" : {
"comment" : "Class = \"UILabel\"; text = \"Tap any widget to load configuration (per widget)\"; ObjectID = \"9Gg-66-UdB\";", "comment" : "Class = \"UILabel\"; text = \"Tap any widget to load configuration (per widget)\"; ObjectID = \"9Gg-66-UdB\";",
"extractionState" : "extracted_with_value", "extractionState" : "extracted_with_value",