Allow not capture mouse

This commit is contained in:
xzzpig committed 2024-11-29 23:00:54 +08:00
1 parent 589ca19e4f
commit 62ae63d7f6
17 files changed
+327 -22

No files matched your search

+19
View File
@@ -554,6 +554,13 @@ ICAgICAgICAgICAgICA
<color key="textColor" red="0.93902439019999995" green="0.9625305918" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.93902439019999995" green="0.9625305918" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Mouse Mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tAd-bm-2IO">
<rect key="frame" x="16" y="2014" width="99" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<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" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="VWB-YB-Ptj" userLabel="External Display Mode"> <segmentedControl opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="VWB-YB-Ptj" userLabel="External Display Mode">
<rect key="frame" x="15" y="1975" width="459" height="32"/> <rect key="frame" x="15" y="1975" width="459" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
@@ -564,6 +571,17 @@ ICAgICAgICAgICAgICA
<color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="selectedSegmentTintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="selectedSegmentTintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</segmentedControl> </segmentedControl>
<segmentedControl opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="4FU-iP-c6T" userLabel="Mouse Mode">
<rect key="frame" x="15" y="2041" width="459" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<segments>
<segment title="Capture"/>
<segment title="Hidden"/>
<segment title="Visible"/>
</segments>
<color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="selectedSegmentTintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</segmentedControl>
</subviews> </subviews>
<color key="backgroundColor" systemColor="viewFlipsideBackgroundColor"/> <color key="backgroundColor" systemColor="viewFlipsideBackgroundColor"/>
</view> </view>
@@ -585,6 +603,7 @@ ICAgICAgICAgICAgICA
<outlet property="keyboardToggleFingerNumSlider" destination="4wJ-Gd-Dmp" id="fbp-o8-KRA"/> <outlet property="keyboardToggleFingerNumSlider" destination="4wJ-Gd-Dmp" id="fbp-o8-KRA"/>
<outlet property="largerStickLR1Selector" destination="sIU-PH-H7V" id="YWg-40-eKd"/> <outlet property="largerStickLR1Selector" destination="sIU-PH-H7V" id="YWg-40-eKd"/>
<outlet property="liftStreamViewForKeyboardSelector" destination="hm3-EV-h6d" id="fHG-J1-eQL"/> <outlet property="liftStreamViewForKeyboardSelector" destination="hm3-EV-h6d" id="fHG-J1-eQL"/>
<outlet property="mouseModeSelector" destination="4FU-iP-c6T" id="4Gz-ao-xH2"/>
<outlet property="mousePointerVelocityFactorSlider" destination="Ei2-FJ-9oC" id="1T3-QA-Jua"/> <outlet property="mousePointerVelocityFactorSlider" destination="Ei2-FJ-9oC" id="1T3-QA-Jua"/>
<outlet property="mousePointerVelocityFactorUILabel" destination="oPM-G6-u5O" id="Eco-5u-PRR"/> <outlet property="mousePointerVelocityFactorUILabel" destination="oPM-G6-u5O" id="Eco-5u-PRR"/>
<outlet property="multiControllerSelector" destination="KlC-fG-wEi" id="giM-F7-So5"/> <outlet property="multiControllerSelector" destination="KlC-fG-wEi" id="giM-F7-So5"/>
+19
View File
@@ -580,6 +580,24 @@ ICAgICAgICAgICAgIA
<color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="selectedSegmentTintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="selectedSegmentTintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</segmentedControl> </segmentedControl>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Mouse Mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VGn-Oc-mKc">
<rect key="frame" x="22" y="1940" width="104" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" 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" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="F96-Um-Q6t" userLabel="Mouse Mode">
<rect key="frame" x="19" y="1969" width="450" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<segments>
<segment title="Capture"/>
<segment title="Hidden"/>
<segment title="Visible"/>
</segments>
<color key="tintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="selectedSegmentTintColor" red="0.6716768742" green="0.61711704730000005" blue="0.99902987480000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</segmentedControl>
</subviews> </subviews>
<color key="backgroundColor" red="0.12156862745098039" green="0.12941176470588237" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.12156862745098039" green="0.12941176470588237" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view> </view>
@@ -601,6 +619,7 @@ ICAgICAgICAgICAgIA
<outlet property="keyboardToggleFingerNumSlider" destination="9rm-7X-TVH" id="SOR-7r-clv"/> <outlet property="keyboardToggleFingerNumSlider" destination="9rm-7X-TVH" id="SOR-7r-clv"/>
<outlet property="largerStickLR1Selector" destination="XbO-CV-orB" id="7vF-xY-n4F"/> <outlet property="largerStickLR1Selector" destination="XbO-CV-orB" id="7vF-xY-n4F"/>
<outlet property="liftStreamViewForKeyboardSelector" destination="pQE-vU-Nr7" id="avO-LL-zes"/> <outlet property="liftStreamViewForKeyboardSelector" destination="pQE-vU-Nr7" id="avO-LL-zes"/>
<outlet property="mouseModeSelector" destination="F96-Um-Q6t" id="Q9r-Wa-ths"/>
<outlet property="mousePointerVelocityFactorSlider" destination="cS3-8R-rEd" id="pcU-fp-Fzg"/> <outlet property="mousePointerVelocityFactorSlider" destination="cS3-8R-rEd" id="pcU-fp-Fzg"/>
<outlet property="mousePointerVelocityFactorUILabel" destination="ecG-dC-PT1" id="MCr-m1-WHm"/> <outlet property="mousePointerVelocityFactorUILabel" destination="ecG-dC-PT1" id="MCr-m1-WHm"/>
<outlet property="multiControllerSelector" destination="OCT-oL-Dqb" id="bLT-gB-FcH"/> <outlet property="multiControllerSelector" destination="OCT-oL-Dqb" id="bLT-gB-FcH"/>
+2 -1
View File
@@ -44,7 +44,8 @@
statsOverlay:(BOOL)statsOverlay statsOverlay:(BOOL)statsOverlay
allowPortrait:(BOOL)allowPortrait allowPortrait:(BOOL)allowPortrait
resolutionSelected:(NSInteger)resolutionSelected resolutionSelected:(NSInteger)resolutionSelected
externalDisplayMode:(NSInteger)externalDisplayMode; externalDisplayMode:(NSInteger)externalDisplayMode
mouseMode:(NSInteger)mouseMode;
- (NSArray*) getHosts; - (NSArray*) getHosts;
- (void) updateHost:(TemporaryHost*)host; - (void) updateHost:(TemporaryHost*)host;
+3 -1
View File
@@ -83,7 +83,8 @@
statsOverlay:(BOOL)statsOverlay statsOverlay:(BOOL)statsOverlay
allowPortrait:(BOOL)allowPortrait allowPortrait:(BOOL)allowPortrait
resolutionSelected:(NSInteger)resolutionSelected resolutionSelected:(NSInteger)resolutionSelected
externalDisplayMode:(NSInteger)externalDisplayMode { externalDisplayMode:(NSInteger)externalDisplayMode
mouseMode:(NSInteger)mouseMode {
[_managedObjectContext performBlockAndWait:^{ [_managedObjectContext performBlockAndWait:^{
Settings* settingsToSave = [self retrieveSettings]; Settings* settingsToSave = [self retrieveSettings];
@@ -119,6 +120,7 @@
settingsToSave.allowPortrait = allowPortrait; settingsToSave.allowPortrait = allowPortrait;
settingsToSave.resolutionSelected = [NSNumber numberWithInteger:resolutionSelected]; settingsToSave.resolutionSelected = [NSNumber numberWithInteger:resolutionSelected];
settingsToSave.externalDisplayMode = [NSNumber numberWithInteger:externalDisplayMode]; settingsToSave.externalDisplayMode = [NSNumber numberWithInteger:externalDisplayMode];
settingsToSave.mouseMode = [NSNumber numberWithInteger:mouseMode];
[self saveData]; [self saveData];
}]; }];
} }
+1
View File
@@ -35,6 +35,7 @@
@property (nonatomic, retain) NSString * uniqueId; @property (nonatomic, retain) NSString * uniqueId;
@property (nonatomic, retain) NSNumber * resolutionSelected; @property (nonatomic, retain) NSNumber * resolutionSelected;
@property (nonatomic, retain) NSNumber * externalDisplayMode; @property (nonatomic, retain) NSNumber * externalDisplayMode;
@property (nonatomic, retain) NSNumber * mouseMode;
@property (nonatomic) enum { @property (nonatomic) enum {
CODEC_PREF_AUTO, CODEC_PREF_AUTO,
CODEC_PREF_H264, CODEC_PREF_H264,
+1
View File
@@ -101,6 +101,7 @@
self.allowPortrait = settings.allowPortrait; self.allowPortrait = settings.allowPortrait;
self.resolutionSelected = settings.resolutionSelected; self.resolutionSelected = settings.resolutionSelected;
self.externalDisplayMode = settings.externalDisplayMode; self.externalDisplayMode = settings.externalDisplayMode;
self.mouseMode = settings.mouseMode;
#endif #endif
self.uniqueId = settings.uniqueId; self.uniqueId = settings.uniqueId;
+20 -13
View File
@@ -46,6 +46,7 @@ static const double MOUSE_SPEED_DIVISOR = 1.25;
char _controllerNumbers; char _controllerNumbers;
bool _multiController; bool _multiController;
bool _swapABXYButtons; bool _swapABXYButtons;
bool _captureMouse;
} }
// UPDATE_BUTTON_FLAG(controller, flag, pressed) // UPDATE_BUTTON_FLAG(controller, flag, pressed)
@@ -864,20 +865,25 @@ static const double MOUSE_SPEED_DIVISOR = 1.25;
} }
-(void) registerMouseCallbacks:(GCMouse*) mouse API_AVAILABLE(ios(14.0)) { -(void) registerMouseCallbacks:(GCMouse*) mouse API_AVAILABLE(ios(14.0)) {
mouse.mouseInput.mouseMovedHandler = ^(GCMouseInput * _Nonnull mouse, float deltaX, float deltaY) { if (_captureMouse){
self->accumulatedDeltaX += deltaX / MOUSE_SPEED_DIVISOR; mouse.mouseInput.mouseMovedHandler = ^(GCMouseInput * _Nonnull mouse, float deltaX, float deltaY) {
self->accumulatedDeltaY += -deltaY / MOUSE_SPEED_DIVISOR; self->accumulatedDeltaX += deltaX / MOUSE_SPEED_DIVISOR;
self->accumulatedDeltaY += -deltaY / MOUSE_SPEED_DIVISOR;
short truncatedDeltaX = (short)self->accumulatedDeltaX;
short truncatedDeltaY = (short)self->accumulatedDeltaY;
if (truncatedDeltaX != 0 || truncatedDeltaY != 0) {
LiSendMouseMoveEvent(truncatedDeltaX, truncatedDeltaY);
self->accumulatedDeltaX -= truncatedDeltaX; short truncatedDeltaX = (short)self->accumulatedDeltaX;
self->accumulatedDeltaY -= truncatedDeltaY; short truncatedDeltaY = (short)self->accumulatedDeltaY;
}
}; if (truncatedDeltaX != 0 || truncatedDeltaY != 0) {
LiSendMouseMoveEvent(truncatedDeltaX, truncatedDeltaY);
self->accumulatedDeltaX -= truncatedDeltaX;
self->accumulatedDeltaY -= truncatedDeltaY;
}
};
} else {
mouse.mouseInput.mouseMovedHandler = nil;
}
mouse.mouseInput.leftButton.pressedChangedHandler = ^(GCControllerButtonInput * _Nonnull button, float value, BOOL pressed) { mouse.mouseInput.leftButton.pressedChangedHandler = ^(GCControllerButtonInput * _Nonnull button, float value, BOOL pressed) {
LiSendMouseButtonEvent(pressed ? BUTTON_ACTION_PRESS : BUTTON_ACTION_RELEASE, BUTTON_LEFT); LiSendMouseButtonEvent(pressed ? BUTTON_ACTION_PRESS : BUTTON_ACTION_RELEASE, BUTTON_LEFT);
@@ -1120,6 +1126,7 @@ static const double MOUSE_SPEED_DIVISOR = 1.25;
} }
} }
_captureMouse = (streamConfig.mouseMode == 0);
if (@available(iOS 14.0, tvOS 14.0, *)) { if (@available(iOS 14.0, tvOS 14.0, *)) {
for (GCMouse* mouse in [GCMouse mice]) { for (GCMouse* mouse in [GCMouse mice]) {
[self registerMouseCallbacks:mouse]; [self registerMouseCallbacks:mouse];
+10 -3
View File
@@ -48,6 +48,8 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
double accumulatedMouseDeltaX; double accumulatedMouseDeltaX;
double accumulatedMouseDeltaY; double accumulatedMouseDeltaY;
int mouseMode;
UIResponder* touchHandler; UIResponder* touchHandler;
id<UserInteractionDelegate> interactionDelegate; id<UserInteractionDelegate> interactionDelegate;
@@ -76,6 +78,8 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
settings = [[[DataManager alloc] init] getSettings]; settings = [[[DataManager alloc] init] getSettings];
mouseMode = streamConfig.mouseMode;
keysDown = [[NSMutableSet alloc] init]; keysDown = [[NSMutableSet alloc] init];
keyInputField = [[KeyboardInputField alloc] initWithFrame:CGRectZero]; keyInputField = [[KeyboardInputField alloc] initWithFrame:CGRectZero];
[keyInputField setKeyboardType:UIKeyboardTypeDefault]; [keyInputField setKeyboardType:UIKeyboardTypeDefault];
@@ -869,7 +873,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
regionForRequest:(UIPointerRegionRequest *)request regionForRequest:(UIPointerRegionRequest *)request
defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4)) { defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4)) {
if (@available(iOS 14.0, *)) { if (@available(iOS 14.0, *)) {
if ([GCMouse current] != nil) { if ([GCMouse current] != nil && mouseMode == 0) {
// We'll handle this with GCMouse. Do nothing here. // We'll handle this with GCMouse. Do nothing here.
return nil; return nil;
} }
@@ -897,8 +901,11 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
} }
- (UIPointerStyle *)pointerInteraction:(UIPointerInteraction *)interaction styleForRegion:(UIPointerRegion *)region API_AVAILABLE(ios(13.4)) { - (UIPointerStyle *)pointerInteraction:(UIPointerInteraction *)interaction styleForRegion:(UIPointerRegion *)region API_AVAILABLE(ios(13.4)) {
// Always hide the mouse cursor over our stream view if(mouseMode != 2){
return [UIPointerStyle hiddenPointerStyle]; return [UIPointerStyle hiddenPointerStyle];
}else{
return nil;
}
} }
- (void)mouseWheelMovedContinuous:(UIPanGestureRecognizer *)gesture { - (void)mouseWheelMovedContinuous:(UIPanGestureRecognizer *)gesture {
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22522" systemVersion="22G313" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> <model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="23507" systemVersion="24B91" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="">
<entity name="App" representedClassName="App" syncable="YES" codeGenerationType="class"> <entity name="App" representedClassName="App" syncable="YES" codeGenerationType="class">
<attribute name="hdrSupported" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="hdrSupported" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="hidden" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="hidden" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
@@ -33,6 +33,7 @@
<attribute name="keyboardToggleFingers" optional="YES" attributeType="Integer 16" defaultValueString="3" usesScalarValueType="NO" syncable="YES"/> <attribute name="keyboardToggleFingers" optional="YES" attributeType="Integer 16" defaultValueString="3" usesScalarValueType="NO" syncable="YES"/>
<attribute name="largerStickLR1" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/> <attribute name="largerStickLR1" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
<attribute name="liftStreamViewForKeyboard" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/> <attribute name="liftStreamViewForKeyboard" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
<attribute name="mouseMode" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
<attribute name="mousePointerVelocityFactor" optional="YES" attributeType="Float" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/> <attribute name="mousePointerVelocityFactor" optional="YES" attributeType="Float" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
<attribute name="multiController" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/> <attribute name="multiController" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
<attribute name="onscreenControls" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/> <attribute name="onscreenControls" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
+1
View File
@@ -32,5 +32,6 @@
@property BOOL multiController; @property BOOL multiController;
@property BOOL useFramePacing; @property BOOL useFramePacing;
@property NSData* serverCert; @property NSData* serverCert;
@property int mouseMode;
@end @end
@@ -18,7 +18,7 @@ static CGFloat screenWidthInPoints;
- (instancetype)initWithTarget:(nullable id)target action:(nullable SEL)action { - (instancetype)initWithTarget:(nullable id)target action:(nullable SEL)action {
self = [super initWithTarget:target action:action]; self = [super initWithTarget:target action:action];
screenWidthInPoints = CGRectGetWidth([[UIScreen mainScreen] bounds]); // Get the screen's bounds (in points) screenWidthInPoints = CGRectGetWidth([UIApplication.sharedApplication.windows.firstObject.screen bounds]); // Get the screen's bounds (in points)
_immediateTriggering = false; _immediateTriggering = false;
_EDGE_TOLERANCE = 15.0f; _EDGE_TOLERANCE = 15.0f;
return self; return self;
@@ -670,6 +670,7 @@ static NSMutableSet* hostList;
// multiController must be set before calling getConnectedGamepadMask // multiController must be set before calling getConnectedGamepadMask
_streamConfig.multiController = streamSettings.multiController; _streamConfig.multiController = streamSettings.multiController;
_streamConfig.gamepadMask = [ControllerSupport getConnectedGamepadMask:_streamConfig]; _streamConfig.gamepadMask = [ControllerSupport getConnectedGamepadMask:_streamConfig];
_streamConfig.mouseMode = streamSettings.mouseMode.intValue;
// Probe for supported channel configurations // Probe for supported channel configurations
int physicalOutputChannels = (int)[AVAudioSession sharedInstance].maximumOutputNumberOfChannels; int physicalOutputChannels = (int)[AVAudioSession sharedInstance].maximumOutputNumberOfChannels;
@@ -58,6 +58,7 @@
@property (nonatomic, strong) MainFrameViewController *mainFrameViewController; @property (nonatomic, strong) MainFrameViewController *mainFrameViewController;
@property (strong, nonatomic) IBOutlet UISegmentedControl *externalDisplayModeSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *externalDisplayModeSelector;
@property (strong, nonatomic) IBOutlet UISegmentedControl *mouseModeSelector;
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability" #pragma clang diagnostic ignored "-Wunguarded-availability"
@@ -560,6 +560,7 @@ BOOL isCustomResolution(CGSize res) {
} }
[self.externalDisplayModeSelector setSelectedSegmentIndex:currentSettings.externalDisplayMode.integerValue]; [self.externalDisplayModeSelector setSelectedSegmentIndex:currentSettings.externalDisplayMode.integerValue];
[self.mouseModeSelector setSelectedSegmentIndex:currentSettings.mouseMode.integerValue];
} }
- (void)slideToSettingsScreenEdgeChanged{ - (void)slideToSettingsScreenEdgeChanged{
@@ -1067,6 +1068,7 @@ BOOL isCustomResolution(CGSize res) {
BOOL allowPortrait = [self.allowPortraitSelector selectedSegmentIndex] == 1; BOOL allowPortrait = [self.allowPortraitSelector selectedSegmentIndex] == 1;
NSInteger resolutionSelected = [self.resolutionSelector selectedSegmentIndex]; NSInteger resolutionSelected = [self.resolutionSelector selectedSegmentIndex];
NSInteger externalDisplayMode = [self.externalDisplayModeSelector selectedSegmentIndex]; NSInteger externalDisplayMode = [self.externalDisplayModeSelector selectedSegmentIndex];
NSInteger mouseMode = [self.mouseModeSelector selectedSegmentIndex];
[dataMan saveSettingsWithBitrate:_bitrate [dataMan saveSettingsWithBitrate:_bitrate
framerate:framerate framerate:framerate
height:height height:height
@@ -1098,7 +1100,8 @@ BOOL isCustomResolution(CGSize res) {
statsOverlay:statsOverlay statsOverlay:statsOverlay
allowPortrait:allowPortrait allowPortrait:allowPortrait
resolutionSelected:resolutionSelected resolutionSelected:resolutionSelected
externalDisplayMode:externalDisplayMode]; externalDisplayMode:externalDisplayMode
mouseMode:mouseMode];
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
@@ -167,6 +167,7 @@
andConfig:(StreamConfiguration*)_streamConfig]; //reload OSC here. andConfig:(StreamConfiguration*)_streamConfig]; //reload OSC here.
[self->_streamView reloadOnScreenButtonViews]; //reload keyboard buttons here. the keyboard button view will be added to the streamframe view instead streamview, the highest layer, which saves a lot of reengineering [self->_streamView reloadOnScreenButtonViews]; //reload keyboard buttons here. the keyboard button view will be added to the streamframe view instead streamview, the highest layer, which saves a lot of reengineering
[self reloadAirPlayConfig]; [self reloadAirPlayConfig];
[self mousePresenceChanged];
//reconfig statsOverlay //reconfig statsOverlay
self->_statsUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:1.0f self->_statsUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:1.0f
@@ -966,7 +967,7 @@
// Pointer lock breaks the UIKit mouse APIs, which is a problem because // Pointer lock breaks the UIKit mouse APIs, which is a problem because
// GCMouse is horribly broken on iOS 14.0 for certain mice. Only lock // GCMouse is horribly broken on iOS 14.0 for certain mice. Only lock
// the cursor if there is a GCMouse present. // the cursor if there is a GCMouse present.
return [GCMouse mice].count > 0; return ([GCMouse mice].count > 0) && [_settings mouseMode].intValue == 0;
} }
#endif #endif
+120
View File
@@ -91,6 +91,96 @@
} }
} }
}, },
"4FU-iP-c6T.segmentTitles[0]" : {
"comment" : "Class = \"UISegmentedControl\"; 4FU-iP-c6T.segmentTitles[0] = \"Capture\"; ObjectID = \"4FU-iP-c6T\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Capture"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "捕获"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "捕获"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "捕获"
}
}
}
},
"4FU-iP-c6T.segmentTitles[1]" : {
"comment" : "Class = \"UISegmentedControl\"; 4FU-iP-c6T.segmentTitles[1] = \"Hidden\"; ObjectID = \"4FU-iP-c6T\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Hidden"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "隐藏"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "隐藏"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "隐藏"
}
}
}
},
"4FU-iP-c6T.segmentTitles[2]" : {
"comment" : "Class = \"UISegmentedControl\"; 4FU-iP-c6T.segmentTitles[2] = \"Visible\"; ObjectID = \"4FU-iP-c6T\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Visible"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "可见"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "可见"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "可见"
}
}
}
},
"4Qy-hB-oa5.text" : { "4Qy-hB-oa5.text" : {
"comment" : "Class = \"UILabel\"; text = \"External Display Mode\"; ObjectID = \"4Qy-hB-oa5\";", "comment" : "Class = \"UILabel\"; text = \"External Display Mode\"; ObjectID = \"4Qy-hB-oa5\";",
"extractionState" : "extracted_with_value", "extractionState" : "extracted_with_value",
@@ -2167,6 +2257,36 @@
} }
} }
}, },
"tAd-bm-2IO.text" : {
"comment" : "Class = \"UILabel\"; text = \"Mouse Mode\"; ObjectID = \"tAd-bm-2IO\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Mouse Mode"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "鼠标模式"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "鼠标模式"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "鼠标模式"
}
}
}
},
"uSS-ev-IFe.configuration.title" : { "uSS-ev-IFe.configuration.title" : {
"comment" : "Class = \"UIButton\"; configuration.title = \"Go Back to Stream View\"; ObjectID = \"uSS-ev-IFe\";", "comment" : "Class = \"UIButton\"; configuration.title = \"Go Back to Stream View\"; ObjectID = \"uSS-ev-IFe\";",
"extractionState" : "extracted_with_value", "extractionState" : "extracted_with_value",
+120
View File
@@ -961,6 +961,96 @@
} }
} }
}, },
"F96-Um-Q6t.segmentTitles[0]" : {
"comment" : "Class = \"UISegmentedControl\"; F96-Um-Q6t.segmentTitles[0] = \"Capture\"; ObjectID = \"F96-Um-Q6t\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Capture"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "捕获"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "捕获"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "捕获"
}
}
}
},
"F96-Um-Q6t.segmentTitles[1]" : {
"comment" : "Class = \"UISegmentedControl\"; F96-Um-Q6t.segmentTitles[1] = \"Hidden\"; ObjectID = \"F96-Um-Q6t\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Hidden"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "隐藏"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "隐藏"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "隐藏"
}
}
}
},
"F96-Um-Q6t.segmentTitles[2]" : {
"comment" : "Class = \"UISegmentedControl\"; F96-Um-Q6t.segmentTitles[2] = \"Visible\"; ObjectID = \"F96-Um-Q6t\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Visible"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "可见"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "可见"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "可见"
}
}
}
},
"FqF-bM-afQ.configuration.title" : { "FqF-bM-afQ.configuration.title" : {
"comment" : "Class = \"UIButton\"; configuration.title = \"Go Back to Stream View\"; ObjectID = \"FqF-bM-afQ\";", "comment" : "Class = \"UIButton\"; configuration.title = \"Go Back to Stream View\"; ObjectID = \"FqF-bM-afQ\";",
"extractionState" : "extracted_with_value", "extractionState" : "extracted_with_value",
@@ -2029,6 +2119,36 @@
} }
} }
}, },
"VGn-Oc-mKc.text" : {
"comment" : "Class = \"UILabel\"; text = \"Mouse Mode\"; ObjectID = \"VGn-Oc-mKc\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Mouse Mode"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "鼠标模式"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "鼠标模式"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "鼠标模式"
}
}
}
},
"VlN-ZW-1gm.text" : { "VlN-ZW-1gm.text" : {
"comment" : "Class = \"UILabel\"; text = \"Touch Pointer Velocity: Scaled on 0% of Right Screen \"; ObjectID = \"VlN-ZW-1gm\";", "comment" : "Class = \"UILabel\"; text = \"Touch Pointer Velocity: Scaled on 0% of Right Screen \"; ObjectID = \"VlN-ZW-1gm\";",
"extractionState" : "extracted_with_value", "extractionState" : "extracted_with_value",