fix: new settings
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="EVd-wq-ego">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="EVd-wq-ego">
|
||||
<device id="ipad11_0rounded" orientation="portrait" layout="fullscreen" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
|
||||
<capability name="Image references" minToolsVersion="12.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -870,6 +870,84 @@
|
||||
<constraint firstAttribute="width" constant="380" id="pkz-ek-bOk"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="6hG-dw-YSr" userLabel="renderingBackend Stack">
|
||||
<rect key="frame" x="20" y="1166" width="380" height="56.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rendering Backend" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v8l-hf-kiR" userLabel="Rendering Backend">
|
||||
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.93902439019999995" green="0.9625305918" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="53H-ST-OtY" userLabel="Rendering Backend Selector">
|
||||
<rect key="frame" x="0.0" y="25.5" width="380" height="32"/>
|
||||
<segments>
|
||||
<segment title="Metal"/>
|
||||
<segment title="AVSampleBuffer"/>
|
||||
</segments>
|
||||
<color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="selectedSegmentTintColor" systemColor="linkColor"/>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="380" id="50i-OF-DWd"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="MML-c1-D5j" userLabel="frameQueueSize Stack">
|
||||
<rect key="frame" x="292" y="1087" width="380" height="89.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Frames to Buffer" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ce3-FM-vIh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
|
||||
<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="2" minValue="1" maxValue="5" minimumValueImage="1.square" catalog="system" maximumValueImage="5.square" translatesAutoresizingMaskIntoConstraints="NO" id="oZa-8Y-icz" userLabel="Frame Queue Size Selector">
|
||||
<rect key="frame" x="-2" y="25.5" width="384" height="31"/>
|
||||
</slider>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="The recommended value is 2. 1 frame provides the lowest latency, but may require an Ethernet connection." lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ylu-hT-Cuz" userLabel="Frame Queue Size Caption">
|
||||
<rect key="frame" x="0.0" y="60.5" width="380" height="29"/>
|
||||
<color key="tintColor" red="0.81533776120000001" green="0.85979419950000002" blue="0.91372549020000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" systemColor="secondarySystemGroupedBackgroundColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="380" id="K66-qD-1fF"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="H1O-Hi-8rG" userLabel="performanceGraphs Stack">
|
||||
<rect key="frame" x="292" y="1611" width="380" height="186.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Performance Graphs - Opacity: 50%" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ccm-n2-PXi" userLabel="Performance Graphs">
|
||||
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.93902439019999995" green="0.9625305918" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3Z9-RB-w4i" userLabel="performanceGraphSwitch">
|
||||
<rect key="frame" x="0.0" y="40.5" width="382" height="31"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="130" id="rBW-bO-yXO"/>
|
||||
</constraints>
|
||||
</switch>
|
||||
<stepper opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="50" maximumValue="100" stepValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="9VJ-Gj-nWG">
|
||||
<rect key="frame" x="0.0" y="91.5" width="380" height="32"/>
|
||||
</stepper>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dK2-1g-PUQ" userLabel="Performance Graphs Caption">
|
||||
<rect key="frame" x="0.0" y="143.5" width="380" height="43"/>
|
||||
<color key="tintColor" red="0.81533776120000001" green="0.85979419950000002" blue="0.91372549020000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<string key="text">Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats.</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" systemColor="secondarySystemGroupedBackgroundColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="380" id="3hg-AM-9mr"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
@@ -888,14 +966,19 @@
|
||||
<outlet property="codecSelector" destination="aFy-0w-YPe" id="DlU-0l-gwz"/>
|
||||
<outlet property="codecStack" destination="gWg-BF-yDI" id="GGc-JQ-N8y"/>
|
||||
<outlet property="customResolutionSwitch" destination="E5w-kK-dOo" id="hrt-v2-8dY"/>
|
||||
<outlet property="enableGraphsSwitch" destination="3Z9-RB-w4i" id="0yT-M0-sr5"/>
|
||||
<outlet property="enableOswForNativeTouchSwitch" destination="Zmq-Kv-Nmp" id="f6j-0V-ldT"/>
|
||||
<outlet property="enableOswSwitchStack" destination="SkS-ft-peB" id="n3M-EK-U74"/>
|
||||
<outlet property="externalDisplayModeSelector" destination="VWB-YB-Ptj" id="0ak-pc-evb"/>
|
||||
<outlet property="externalDisplayModeStack" destination="YBu-VX-wpN" id="72y-R6-fF7"/>
|
||||
<outlet property="fpsStack" destination="TuR-H8-e2H" id="zGQ-gR-P1i"/>
|
||||
<outlet property="framePacingSelector" destination="OOg-A3-DdM" id="XJL-lk-f5K"/>
|
||||
<outlet property="frameQueueSizeLabel" destination="Ce3-FM-vIh" id="90D-Tq-OGd"/>
|
||||
<outlet property="frameQueueSizeSlider" destination="oZa-8Y-icz" id="Jo1-Fx-UMw"/>
|
||||
<outlet property="frameQueueSizeStack" destination="MML-c1-D5j" id="uFG-Ch-nsK"/>
|
||||
<outlet property="framepacingStack" destination="9C2-td-rMV" id="5wc-qn-fo5"/>
|
||||
<outlet property="framerateSelector" destination="8hF-kb-2uV" id="dfT-hb-csE"/>
|
||||
<outlet property="graphOpacityStepper" destination="9VJ-Gj-nWG" id="plg-Q6-54j"/>
|
||||
<outlet property="gyroModeSelector" destination="aa5-3y-I4d" id="FsX-kH-h7w"/>
|
||||
<outlet property="gyroModeStack" destination="kAD-mK-aP8" id="GvL-Yx-S2t"/>
|
||||
<outlet property="gyroSensitivitySlider" destination="3Ge-IB-PBj" id="Pdg-ke-KG3"/>
|
||||
@@ -916,9 +999,12 @@
|
||||
<outlet property="onscreenControllerLabel" destination="LGV-5y-piG" id="GsV-fS-lX9"/>
|
||||
<outlet property="optimizeGamesStack" destination="TvS-69-vcF" id="pm1-0c-dCR"/>
|
||||
<outlet property="optimizeGamesSwitch" destination="Sui-Ig-YxN" id="Lxu-si-ugy"/>
|
||||
<outlet property="performanceGraphStack" destination="H1O-Hi-8rG" id="AcS-Va-yZs"/>
|
||||
<outlet property="pointerVelocityDividerStack" destination="b1U-nD-gYE" id="ep1-K3-rKj"/>
|
||||
<outlet property="pointerVelocityFactorStack" destination="vdk-mK-ztu" id="Cik-Rh-pGS"/>
|
||||
<outlet property="pointerVelocityModeDividerSlider" destination="AcZ-2i-GI4" id="dGf-ZU-w3S"/>
|
||||
<outlet property="renderingBackendSelector" destination="53H-ST-OtY" id="jhu-Pw-Phg"/>
|
||||
<outlet property="renderingBackendStack" destination="6hG-dw-YSr" id="qqz-lA-EOE"/>
|
||||
<outlet property="resolutionSelector" destination="ckc-Dm-8ex" id="rl6-rx-wd3"/>
|
||||
<outlet property="resolutionStack" destination="zpX-lo-MLA" id="9Hu-I9-hjH"/>
|
||||
<outlet property="reverseMouseWheelDirectionSelector" destination="mTM-NL-CcF" id="EYZ-Qg-OLu"/>
|
||||
@@ -1583,6 +1669,8 @@
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="1.square" catalog="system" width="128" height="114"/>
|
||||
<image name="5.square" catalog="system" width="128" height="114"/>
|
||||
<image name="ChevronCompactUp" width="35" height="10"/>
|
||||
<image name="arrow.left.square.fill" catalog="system" width="128" height="114"/>
|
||||
<image name="arrow.uturn.backward" width="19.06089973449707" height="18.594499588012695"/>
|
||||
@@ -1595,6 +1683,9 @@
|
||||
<systemColor name="linkColor">
|
||||
<color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="secondarySystemGroupedBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *unlockDisplayOrientationStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *externalDisplayModeStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *localMousePointerModeStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *renderingBackendStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *frameQueueSizeStack;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *performanceGraphStack;
|
||||
|
||||
@property (strong, nonatomic) IBOutlet UILabel *bitrateLabel;
|
||||
@property (strong, nonatomic) IBOutlet UISlider *bitrateSlider;
|
||||
|
||||
@@ -484,6 +484,9 @@ BOOL isCustomResolution(CGSize res) {
|
||||
[self addSetting:self.codecStack ofId:@"codecStack" withInfoTag:NO withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.HdrStack ofId:@"HdrStack" withInfoTag:NO withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.yuv444Stack ofId:@"yuv444Stack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.frameQueueSizeStack ofId:@"frameQueueSizeStack" withInfoTag:NO withDynamicLabel:NO to:videoSection];
|
||||
[self addSetting:self.renderingBackendStack ofId:@"renderingBackendStack" withInfoTag:YES withDynamicLabel:NO to:videoSection];
|
||||
|
||||
[videoSection addToParentStack:_parentStack];
|
||||
[videoSection setExpanded:YES];
|
||||
|
||||
@@ -556,6 +559,8 @@ BOOL isCustomResolution(CGSize res) {
|
||||
[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.softKeyboardToolbarStack ofId:@"softKeyboardToolbarStack" withInfoTag:YES withDynamicLabel:NO to:otherSection];
|
||||
[self addSetting:self.performanceGraphStack ofId:@"performanceGraphStack" withInfoTag:YES withDynamicLabel:NO to:otherSection];
|
||||
|
||||
[otherSection addToParentStack:_parentStack];
|
||||
[otherSection setExpanded:YES];
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
#import "StreamManager.h"
|
||||
#import "ControllerSupport.h"
|
||||
#import "DataManager.h"
|
||||
#import "PaddedLabel.h"
|
||||
#import "ImGuiRenderer.h"
|
||||
#import "RelativeTouchHandler.h"
|
||||
#import "MetalVideoRenderer.h"
|
||||
#import "CustomEdgeSlideGestureRecognizer.h"
|
||||
#import "CustomTapGestureRecognizer.h"
|
||||
#import "LocalizationHelper.h"
|
||||
@@ -46,10 +50,10 @@
|
||||
TemporarySettings *_settings;
|
||||
NSTimer *_inactivityTimer;
|
||||
NSTimer *_statsUpdateTimer;
|
||||
PaddedLabel *_overlayView;
|
||||
UITapGestureRecognizer *_menuTapGestureRecognizer;
|
||||
UITapGestureRecognizer *_menuDoubleTapGestureRecognizer;
|
||||
UITapGestureRecognizer *_playPauseTapGestureRecognizer;
|
||||
UITextView *_overlayView;
|
||||
UILabel *_stageLabel;
|
||||
UILabel *_tipLabel;
|
||||
UIActivityIndicatorView *_spinner;
|
||||
@@ -58,6 +62,9 @@
|
||||
BOOL _userIsInteracting;
|
||||
bool viewJustLoaded;
|
||||
CGSize _keyboardSize;
|
||||
PlotMetrics _decodeMetrics;
|
||||
PlotMetrics _frameDropMetrics;
|
||||
PlotMetrics _frameQueueMetrics;
|
||||
UIWindow *_extWindow;
|
||||
UIView *_streamVideoRenderView;
|
||||
/*
|
||||
@@ -74,6 +81,13 @@
|
||||
CustomTapGestureRecognizer *_oscLayoutTapRecoginizer;
|
||||
LayoutOnScreenControlsViewController *_layoutOnScreenControlsVC;
|
||||
ToolboxViewController* toolBoxViewController;
|
||||
UISwipeGestureRecognizer *_topSwipeRecognizer;
|
||||
UISwipeGestureRecognizer *_topSwipeUpRecognizer;
|
||||
#else
|
||||
UITapGestureRecognizer *_menuTapGestureRecognizer;
|
||||
UITapGestureRecognizer *_menuDoubleTapGestureRecognizer;
|
||||
UITapGestureRecognizer *_playPauseTapGestureRecognizer;
|
||||
UITapGestureRecognizer *_remoteDoubleSelectRecognizer;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -292,6 +306,14 @@
|
||||
Log(LOG_I, @"Play/Pause button pressed -- backing out of stream");
|
||||
[self returnToMainFrame];
|
||||
}
|
||||
- (void)remoteSelectButtonDoublePressed:(id)sender {
|
||||
Log(LOG_I, @"Select button double-tapped -- toggling stats");
|
||||
if (!self->_statsUpdateTimer) {
|
||||
[self showStats];
|
||||
} else {
|
||||
[self hideStats];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
- (void)popFirstLaunchTip {
|
||||
@@ -399,7 +421,7 @@
|
||||
if([self isFirstLaunch]) [self popFirstLaunchTip];
|
||||
|
||||
#if TARGET_OS_TV
|
||||
if (!_menuTapGestureRecognizer || !_menuDoubleTapGestureRecognizer || !_playPauseTapGestureRecognizer) {
|
||||
if (!_menuTapGestureRecognizer || !_menuDoubleTapGestureRecognizer || !_playPauseTapGestureRecognizer || !_remoteDoubleSelectRecognizer) {
|
||||
_menuTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(controllerPauseButtonPressed:)];
|
||||
_menuTapGestureRecognizer.allowedPressTypes = @[@(UIPressTypeMenu)];
|
||||
|
||||
@@ -410,15 +432,37 @@
|
||||
_menuDoubleTapGestureRecognizer.numberOfTapsRequired = 2;
|
||||
[_menuTapGestureRecognizer requireGestureRecognizerToFail:_menuDoubleTapGestureRecognizer];
|
||||
_menuDoubleTapGestureRecognizer.allowedPressTypes = @[@(UIPressTypeMenu)];
|
||||
|
||||
_remoteDoubleSelectRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(remoteSelectButtonDoublePressed:)];
|
||||
_remoteDoubleSelectRecognizer.numberOfTapsRequired = 2;
|
||||
_remoteDoubleSelectRecognizer.allowedPressTypes = @[@(UIPressTypeSelect)];
|
||||
}
|
||||
|
||||
[self.view addGestureRecognizer:_menuTapGestureRecognizer];
|
||||
[self.view addGestureRecognizer:_menuDoubleTapGestureRecognizer];
|
||||
[self.view addGestureRecognizer:_playPauseTapGestureRecognizer];
|
||||
[self.view addGestureRecognizer:_remoteDoubleSelectRecognizer];
|
||||
|
||||
#else
|
||||
//[self configSwipeGestures]; // swipe & exit gesture configured here
|
||||
//[self configOscLayoutTool]; //_oscLayoutTapRecoginizer will be added or removed to the view here
|
||||
_topSwipeRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(topSwiped)];
|
||||
_topSwipeRecognizer.direction = UISwipeGestureRecognizerDirectionDown;
|
||||
_topSwipeRecognizer.numberOfTouchesRequired = 2;
|
||||
_topSwipeRecognizer.enabled = TRUE;
|
||||
[self.view addGestureRecognizer:_topSwipeRecognizer];
|
||||
|
||||
_topSwipeUpRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(topSwipedUp)];
|
||||
_topSwipeUpRecognizer.direction = UISwipeGestureRecognizerDirectionUp;
|
||||
_topSwipeUpRecognizer.numberOfTouchesRequired = 2;
|
||||
_topSwipeUpRecognizer.enabled = FALSE;
|
||||
// This is added to the _overlayView when displayed
|
||||
#endif
|
||||
|
||||
_streamView = [[StreamView alloc] initWithFrame:self.view.frame];
|
||||
#if TARGET_OS_TV
|
||||
// we need to tell the other remote handler in RelativeTouchHandler to wait for our double-select
|
||||
RelativeTouchHandler *touchHandler = (RelativeTouchHandler *)[_streamView touchHandler];
|
||||
UIGestureRecognizer *remotePressRecognizer = [touchHandler remotePressRecognizer];
|
||||
[remotePressRecognizer requireGestureRecognizerToFail:_remoteDoubleSelectRecognizer];
|
||||
#endif
|
||||
|
||||
_tipLabel = [[UILabel alloc] init];
|
||||
@@ -479,6 +523,26 @@
|
||||
[self.view addSubview:_stageLabel];
|
||||
[self.view addSubview:_spinner];
|
||||
[self.view addSubview:_tipLabel];
|
||||
|
||||
if ([_settings.renderingBackend intValue] == RENDER_METAL) {
|
||||
// Metal view for video
|
||||
// TODO: refactor the way things access observeFloat for stats
|
||||
self.metalViewController = [[MetalViewController alloc] initWithFrame:self.view.bounds
|
||||
framerate:[self->_settings.framerate floatValue]
|
||||
enableHdr:self->_settings.enableHdr
|
||||
metricsHandler:self.imguiView.metricsHandler];
|
||||
[self.view addSubview:self.metalViewController.view];
|
||||
[self.view bringSubviewToFront:self.metalViewController.view];
|
||||
}
|
||||
|
||||
// Make a MetalKit view for ImGui
|
||||
self.imguiView = [[ImGuiRenderer alloc] initWithFrame:self.view.bounds
|
||||
streamFps:[_settings.framerate intValue]
|
||||
enableGraphs:_settings.enableGraphs
|
||||
graphOpacity:[_settings.graphOpacity intValue]];
|
||||
[self.view addSubview:self.imguiView.mtkView];
|
||||
[self.view bringSubviewToFront:self.imguiView.mtkView];
|
||||
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification{
|
||||
@@ -589,13 +653,12 @@
|
||||
|
||||
- (void)updateOverlayText:(NSString*)text {
|
||||
if (_overlayView == nil) {
|
||||
_overlayView = [[UITextView alloc] init];
|
||||
#if !TARGET_OS_TV
|
||||
[_overlayView setEditable:NO];
|
||||
#endif
|
||||
[_overlayView setUserInteractionEnabled:NO];
|
||||
[_overlayView setSelectable:NO];
|
||||
[_overlayView setScrollEnabled:NO];
|
||||
_overlayView = [[PaddedLabel alloc] initWithFrame:CGRectZero];
|
||||
[_overlayView setTextInsets:UIEdgeInsetsMake(10, 15, 10, 15)];
|
||||
[_overlayView setUserInteractionEnabled:YES];
|
||||
[_overlayView setNumberOfLines:100];
|
||||
[_overlayView.layer setCornerRadius:12];
|
||||
[_overlayView.layer setMasksToBounds:YES];
|
||||
|
||||
// HACK: If not using stats overlay, center the text
|
||||
if (_statsUpdateTimer == nil) {
|
||||
@@ -605,17 +668,15 @@
|
||||
[_overlayView setTextColor:[UIColor lightGrayColor]];
|
||||
[_overlayView setBackgroundColor:[UIColor blackColor]];
|
||||
#if TARGET_OS_TV
|
||||
[_overlayView setFont:[UIFont systemFontOfSize:24]];
|
||||
[_overlayView setFont:[UIFont systemFontOfSize:24 weight:UIFontWeightMedium]];
|
||||
#else
|
||||
if (@available(iOS 13.0, *)) {
|
||||
[_overlayView setFont:[UIFont monospacedSystemFontOfSize:12 weight:UIFontWeightRegular]];
|
||||
} else {
|
||||
[_overlayView setFont:[UIFont systemFontOfSize:12]];// Fallback on earlier versions
|
||||
}
|
||||
//[_overlayView setFont:[UIFont fontWithName:@"Menlo" size:12]];
|
||||
[_overlayView setFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium]];
|
||||
|
||||
_topSwipeUpRecognizer.enabled = TRUE;
|
||||
[_overlayView addGestureRecognizer:_topSwipeUpRecognizer];
|
||||
#endif
|
||||
[_overlayView setAlpha:0.5];
|
||||
int opacity = MAX([_settings.graphOpacity intValue], 60);
|
||||
[_overlayView setAlpha:(float)opacity / 100.0];
|
||||
[self.view addSubview:_overlayView];
|
||||
}
|
||||
|
||||
@@ -629,7 +690,7 @@
|
||||
_overlayView.frame.size.height)];
|
||||
[_overlayView setText:text];
|
||||
[_overlayView sizeToFit];
|
||||
[_overlayView setCenter:CGPointMake(self.view.frame.size.width / 2, _overlayView.frame.size.height / 2)];
|
||||
[_overlayView setCenter:CGPointMake(self.view.frame.size.width / 2, (12 + (_overlayView.frame.size.height / 2)))];
|
||||
[_overlayView setHidden:NO];
|
||||
}
|
||||
else {
|
||||
@@ -643,7 +704,12 @@
|
||||
|
||||
[_statsUpdateTimer invalidate];
|
||||
_statsUpdateTimer = nil;
|
||||
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
_topSwipeRecognizer.enabled = FALSE;
|
||||
_topSwipeUpRecognizer.enabled = FALSE;
|
||||
#endif
|
||||
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
|
||||
_extWindow = nil;
|
||||
@@ -802,6 +868,58 @@
|
||||
[self returnToMainFrame];
|
||||
}
|
||||
|
||||
- (void)topSwiped {
|
||||
Log(LOG_I, @"User swiped/cicked down for stats");
|
||||
[self showStats];
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
_topSwipeRecognizer.enabled = FALSE;
|
||||
_topSwipeUpRecognizer.enabled = TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)showStats {
|
||||
if (self->_statsUpdateTimer == nil) {
|
||||
self->_statsUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:1.0f
|
||||
target:self
|
||||
selector:@selector(updateStatsOverlay)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
[self->_statsUpdateTimer fire];
|
||||
|
||||
if (_settings.enableGraphs) {
|
||||
[self.imguiView start];
|
||||
[self.imguiView show];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)topSwipedUp {
|
||||
Log(LOG_I, @"User swiped up to hide stats");
|
||||
[self hideStats];
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
_topSwipeRecognizer.enabled = TRUE;
|
||||
_topSwipeUpRecognizer.enabled = FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)hideStats {
|
||||
if (self->_statsUpdateTimer != nil) {
|
||||
[_statsUpdateTimer invalidate];
|
||||
_statsUpdateTimer = nil;
|
||||
}
|
||||
|
||||
if (_overlayView != nil) {
|
||||
[_overlayView setHidden:YES];
|
||||
}
|
||||
|
||||
if (_settings.enableGraphs) {
|
||||
[self.imguiView hide];
|
||||
[self.imguiView stop];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) connectionStarted {
|
||||
Log(LOG_I, @"Connection started");
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@@ -816,6 +934,7 @@
|
||||
[self->_controllerSupport connectionEstablished];
|
||||
|
||||
if (self->_settings.statsOverlayEnabled) {
|
||||
[self topSwiped];
|
||||
self->_statsUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:1.0f
|
||||
target:self
|
||||
selector:@selector(updateStatsOverlay)
|
||||
@@ -1025,7 +1144,7 @@
|
||||
if (@available(tvOS 11.2, *)) {
|
||||
UIWindow* window = [[[UIApplication sharedApplication] delegate] window];
|
||||
AVDisplayManager* displayManager = [window avDisplayManager];
|
||||
|
||||
|
||||
// This logic comes from Kodi and MrMC
|
||||
if (streamActive) {
|
||||
int dynamicRange;
|
||||
@@ -1036,7 +1155,7 @@
|
||||
else {
|
||||
dynamicRange = 0; // SDR
|
||||
}
|
||||
|
||||
|
||||
AVDisplayCriteria* displayCriteria = [[AVDisplayCriteria alloc] initWithRefreshRate:[_settings.framerate floatValue]
|
||||
videoDynamicRange:dynamicRange];
|
||||
displayManager.preferredDisplayCriteria = displayCriteria;
|
||||
@@ -1061,6 +1180,14 @@
|
||||
[self.view setBackgroundColor:[UIColor blackColor]];
|
||||
}
|
||||
|
||||
- (void) observeFloat:(int)plotId value:(CFTimeInterval)value {
|
||||
[self.imguiView observeFloat:plotId value:value];
|
||||
}
|
||||
|
||||
- (void) observeFloatReturnMetrics:(int)plotId value:(CFTimeInterval)value plotMetrics:(PlotMetrics *)plotMetrics {
|
||||
return [self.imguiView observeFloatReturnMetrics:plotId value:value plotMetrics:plotMetrics];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
@@ -349,6 +349,30 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"53H-ST-OtY.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[0] = \"Metal\"; ObjectID = \"53H-ST-OtY\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Metal"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"53H-ST-OtY.segmentTitles[1]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; 53H-ST-OtY.segmentTitles[1] = \"AVSampleBuffer\"; ObjectID = \"53H-ST-OtY\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "AVSampleBuffer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"aa5-3y-I4d.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; aa5-3y-I4d.segmentTitles[0] = \"Off\"; ObjectID = \"aa5-3y-I4d\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
@@ -853,6 +877,30 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ccm-n2-PXi.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Performance Graphs - Opacity: 50%\"; ObjectID = \"ccm-n2-PXi\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Performance Graphs - Opacity: 50%"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Ce3-FM-vIh.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Frames to Buffer\"; ObjectID = \"Ce3-FM-vIh\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Frames to Buffer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ckc-Dm-8ex.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; ckc-Dm-8ex.segmentTitles[0] = \"360p\"; ObjectID = \"ckc-Dm-8ex\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
@@ -1081,6 +1129,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dK2-1g-PUQ.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats.\"; ObjectID = \"dK2-1g-PUQ\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Dll-7x-18l.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Swap A/B and X/Y Buttons\"; ObjectID = \"Dll-7x-18l\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
@@ -2899,6 +2959,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v8l-hf-kiR.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Rendering Backend\"; ObjectID = \"v8l-hf-kiR\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Rendering Backend"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"vJs-pg-hHe.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"test\"; ObjectID = \"vJs-pg-hHe\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
@@ -3001,6 +3073,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Ylu-hT-Cuz.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"The recommended value is 2. 1 frame provides the lowest latency, but may require an Ethernet connection.\"; ObjectID = \"Ylu-hT-Cuz\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "The recommended value is 2. 1 frame provides the lowest latency, but may require an Ethernet connection."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"yY7-Sf-Zes.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; yY7-Sf-Zes.segmentTitles[0] = \"Slide From Left Edge\"; ObjectID = \"yY7-Sf-Zes\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
|
||||
Reference in New Issue
Block a user