9.0.0-AXX-MultiTouch

This commit is contained in:
ZWM committed 2024-02-17 21:31:43 +08:00
1 parent 6f40922704
commit 2e403acf3e
7 files changed
+261 -154

No files matched your search

+80 -78
View File
@@ -38,83 +38,85 @@
return self; return self;
} }
- (void)onLongPressStart:(NSTimer*)timer { //- (void)onLongPressStart:(NSTimer*)timer {
// Raise the left click and start a right click // // Raise the left click and start a right click
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT); // LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT);
LiSendMouseButtonEvent(BUTTON_ACTION_PRESS, BUTTON_RIGHT); // LiSendMouseButtonEvent(BUTTON_ACTION_PRESS, BUTTON_RIGHT);
} //}
//
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { //- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
// Ignore touch down events with more than one finger // // Ignore touch down events with more than one finger
if ([[event allTouches] count] > 1) { // return;
return; // if ([[event allTouches] count] > 1) {
} // return;
// }
UITouch* touch = [touches anyObject]; //
CGPoint touchLocation = [touch locationInView:view]; // UITouch* touch = [touches anyObject];
// CGPoint touchLocation = [touch locationInView:view];
// Don't reposition for finger down events within the deadzone. This makes double-clicking easier. //
if (touch.timestamp - lastTouchUp.timestamp > DOUBLE_TAP_DEAD_ZONE_DELAY || // // Don't reposition for finger down events within the deadzone. This makes double-clicking easier.
sqrt(pow((touchLocation.x / view.bounds.size.width) - (lastTouchUpLocation.x / view.bounds.size.width), 2) + // if (touch.timestamp - lastTouchUp.timestamp > DOUBLE_TAP_DEAD_ZONE_DELAY ||
pow((touchLocation.y / view.bounds.size.height) - (lastTouchUpLocation.y / view.bounds.size.height), 2)) > DOUBLE_TAP_DEAD_ZONE_DELTA) { // sqrt(pow((touchLocation.x / view.bounds.size.width) - (lastTouchUpLocation.x / view.bounds.size.width), 2) +
[view updateCursorLocation:touchLocation isMouse:NO]; // pow((touchLocation.y / view.bounds.size.height) - (lastTouchUpLocation.y / view.bounds.size.height), 2)) > DOUBLE_TAP_DEAD_ZONE_DELTA) {
} // [view updateCursorLocation:touchLocation isMouse:NO];
// }
// Press the left button down //
LiSendMouseButtonEvent(BUTTON_ACTION_PRESS, BUTTON_LEFT); // // Press the left button down
// LiSendMouseButtonEvent(BUTTON_ACTION_PRESS, BUTTON_LEFT);
// Start the long press timer //
longPressTimer = [NSTimer scheduledTimerWithTimeInterval:LONG_PRESS_ACTIVATION_DELAY // // Start the long press timer
target:self // longPressTimer = [NSTimer scheduledTimerWithTimeInterval:LONG_PRESS_ACTIVATION_DELAY
selector:@selector(onLongPressStart:) // target:self
userInfo:nil // selector:@selector(onLongPressStart:)
repeats:NO]; // userInfo:nil
// repeats:NO];
lastTouchDown = touch; //
lastTouchDownLocation = touchLocation; // lastTouchDown = touch;
} // lastTouchDownLocation = touchLocation;
//}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { //
// Ignore touch move events with more than one finger //- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
if ([[event allTouches] count] > 1) { // // Ignore touch move events with more than one finger
return; // return;
} // if ([[event allTouches] count] > 1) {
// return;
UITouch* touch = [touches anyObject]; // }
CGPoint touchLocation = [touch locationInView:view]; //
// UITouch* touch = [touches anyObject];
if (sqrt(pow((touchLocation.x / view.bounds.size.width) - (lastTouchDownLocation.x / view.bounds.size.width), 2) + // CGPoint touchLocation = [touch locationInView:view];
pow((touchLocation.y / view.bounds.size.height) - (lastTouchDownLocation.y / view.bounds.size.height), 2)) > LONG_PRESS_ACTIVATION_DELTA) { //
// Moved too far since touch down. Cancel the long press timer. // if (sqrt(pow((touchLocation.x / view.bounds.size.width) - (lastTouchDownLocation.x / view.bounds.size.width), 2) +
[longPressTimer invalidate]; // pow((touchLocation.y / view.bounds.size.height) - (lastTouchDownLocation.y / view.bounds.size.height), 2)) > LONG_PRESS_ACTIVATION_DELTA) {
longPressTimer = nil; // // Moved too far since touch down. Cancel the long press timer.
} // [longPressTimer invalidate];
// longPressTimer = nil;
[view updateCursorLocation:[[touches anyObject] locationInView:view] isMouse:NO]; // }
} //
// [view updateCursorLocation:[[touches anyObject] locationInView:view] isMouse:NO];
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { //}
// Only fire this logic if all touches have ended //
if ([[event allTouches] count] == [touches count]) { //- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
// Cancel the long press timer // // Only fire this logic if all touches have ended
[longPressTimer invalidate]; // if ([[event allTouches] count] == [touches count]) {
longPressTimer = nil; // // Cancel the long press timer
// [longPressTimer invalidate];
// Left button up on finger up // longPressTimer = nil;
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT); //
// // Left button up on finger up
// Raise right button too in case we triggered a long press gesture // LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT);
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_RIGHT); //
// // Raise right button too in case we triggered a long press gesture
// Remember this last touch for touch-down deadzoning // LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_RIGHT);
lastTouchUp = [touches anyObject]; //
lastTouchUpLocation = [lastTouchUp locationInView:view]; // // Remember this last touch for touch-down deadzoning
} // lastTouchUp = [touches anyObject];
} // lastTouchUpLocation = [lastTouchUp locationInView:view];
// }
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { //}
// Treat this as a normal touchesEnded event //
[self touchesEnded:touches withEvent:event]; //- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
} // // Treat this as a normal touchesEnded event
// [self touchesEnded:touches withEvent:event];
//}
@end @end
+152 -50
View File
@@ -87,25 +87,24 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
Log(LOG_I, @"Setting manual on-screen controls level: %d", (int)level); Log(LOG_I, @"Setting manual on-screen controls level: %d", (int)level);
[onScreenControls setLevel:level]; [onScreenControls setLevel:level];
} }
// It would be nice to just use GCMouse on iOS 14+ and the older API on iOS 13 // It would be nice to just use GCMouse on iOS 14+ and the older API on iOS 13
// but unfortunately that isn't possible today. GCMouse doesn't recognize many // but unfortunately that isn't possible today. GCMouse doesn't recognize many
// mice correctly, but UIKit does. We will register for both and ignore UIKit // mice correctly, but UIKit does. We will register for both and ignore UIKit
// events if a GCMouse is connected. // events if a GCMouse is connected.
if (@available(iOS 13.4, *)) { if (@available(iOS 13.4, *)) {
[self addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]]; // [self addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]];
//
UIPanGestureRecognizer *discreteMouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMovedDiscrete:)]; // UIPanGestureRecognizer *discreteMouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMovedDiscrete:)];
discreteMouseWheelRecognizer.maximumNumberOfTouches = 0; // discreteMouseWheelRecognizer.maximumNumberOfTouches = 0;
discreteMouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskDiscrete; // discreteMouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskDiscrete;
discreteMouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)]; // discreteMouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)];
[self addGestureRecognizer:discreteMouseWheelRecognizer]; // [self addGestureRecognizer:discreteMouseWheelRecognizer];
//
UIPanGestureRecognizer *continuousMouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMovedContinuous:)]; // UIPanGestureRecognizer *continuousMouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMovedContinuous:)];
continuousMouseWheelRecognizer.maximumNumberOfTouches = 0; // continuousMouseWheelRecognizer.maximumNumberOfTouches = 0;
continuousMouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskContinuous; // continuousMouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskContinuous;
continuousMouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)]; // continuousMouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)];
[self addGestureRecognizer:continuousMouseWheelRecognizer]; // [self addGestureRecognizer:continuousMouseWheelRecognizer];
} }
#if defined(__IPHONE_16_1) || defined(__TVOS_16_1) #if defined(__IPHONE_16_1) || defined(__TVOS_16_1)
@@ -240,6 +239,73 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
return 90 - MIN(90, altitudeDegs); return 90 - MIN(90, altitudeDegs);
} }
- (void)trySendTouchEvent:(UITouch*)event index:(int)index{
uint8_t type;
NSLog(@"trySendTouchEvent %ld,%d",(long)event.phase,(uint32_t)event);
//#define LI_TOUCH_EVENT_HOVER 0x00
//#define LI_TOUCH_EVENT_DOWN 0x01
//#define LI_TOUCH_EVENT_UP 0x02
//#define LI_TOUCH_EVENT_MOVE 0x03
//#define LI_TOUCH_EVENT_CANCEL 0x04
//#define LI_TOUCH_EVENT_BUTTON_ONLY 0x05
//#define LI_TOUCH_EVENT_HOVER_LEAVE 0x06
//#define LI_TOUCH_EVENT_CANCEL_ALL 0x07
//#define LI_ROT_UNKNOWN 0xFFFF
// UITouchPhaseBegan, // whenever a finger touches the surface.
// UITouchPhaseMoved, // whenever a finger moves on the surface.
// UITouchPhaseStationary, // whenever a finger is touching the surface but hasn't moved since the previous event.
// UITouchPhaseEnded, // whenever a finger leaves the surface.
// UITouchPhaseCancelled, // whenever a touch doesn't end but we need to stop tracking (e.g. putting device to face)
// UITouchPhaseRegionEntered API_AVAILABLE(ios(13.4), tvos(13.4)) API_UNAVAILABLE(watchos), // whenever a touch is entering the region of a user interface
// UITouchPhaseRegionMoved API_AVAILABLE(ios(13.4), tvos(13.4)) API_UNAVAILABLE(watchos), // when a touch is inside the region of a user interface, but hasn’t yet made contact or left the region
// UITouchPhaseRegionExited API_AVAILABLE(ios(13.4), tvos(13.4))
switch (event.phase) {
case UITouchPhaseBegan://开始触摸
type = LI_TOUCH_EVENT_DOWN;
break;
case UITouchPhaseMoved://移动
case UITouchPhaseStationary:
type = LI_TOUCH_EVENT_MOVE;
break;
case UITouchPhaseEnded://触摸结束
type = LI_TOUCH_EVENT_UP;
break;
case UITouchPhaseCancelled://触摸取消
type = LI_TOUCH_EVENT_CANCEL;
break;
case UITouchPhaseRegionEntered://停留
case UITouchPhaseRegionMoved://停留
type = LI_TOUCH_EVENT_HOVER;
break;
default:
return;
}
// switch (event.phase) {
// case UITouchPhaseBegan:
// type = LI_TOUCH_EVENT_DOWN;
// break;
// case UITouchPhaseMoved:
// type = LI_TOUCH_EVENT_MOVE;
// break;
// case UITouchPhaseEnded:
// type = LI_TOUCH_EVENT_UP;
// break;
// case UITouchPhaseCancelled:
// type = LI_TOUCH_EVENT_CANCEL;
// break;
// default:
// return;
// }
CGPoint location = [self adjustCoordinatesForVideoArea:[event locationInView:self]];
CGSize videoSize = [self getVideoAreaSize];
LiSendTouchEvent(type,(uint32_t)event,location.x / videoSize.width, location.y / videoSize.height,(event.force / event.maximumPossibleForce) / sin(event.altitudeAngle),0.0f, 0.0f,[self getRotationFromAzimuthAngle:[event azimuthAngleInView:self]]);
}
- (void)sendStylusEvent:(UITouch*)event { - (void)sendStylusEvent:(UITouch*)event {
uint8_t type; uint8_t type;
@@ -327,11 +393,32 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
#if !TARGET_OS_TV #if !TARGET_OS_TV
if (@available(iOS 13.4, *)) { if (@available(iOS 13.4, *)) {
// NSArray<UITouch*> *arr1 = [[event allTouches] allObjects];
//// NSLog(@"touchesBegan - %lu",[[event allTouches] count]);
//// NSLog(@"touchesBegan - %lu",arr1.count);
//
// for(int i=0;i<arr1.count;i++){
// if (arr1[i].type == UITouchTypePencil) {
// [self sendStylusEvent:arr1[i]];
// return;
//
// }
// TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
// if (settings.absoluteTouchMode) {
// [self trySendTouchEvent:arr1[i] index:i];
// return;
// }
// }
for (UITouch* touch in touches) { for (UITouch* touch in touches) {
if (touch.type == UITouchTypePencil) { if (touch.type == UITouchTypePencil) {
[self sendStylusEvent:touch]; [self sendStylusEvent:touch];
return; return;
} }
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
if (settings.absoluteTouchMode) {
[self trySendTouchEvent:touch index:0];
// return;
}
} }
} }
#endif #endif
@@ -344,42 +431,42 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
// is triggered. // is triggered.
[touchHandler touchesBegan:touches withEvent:event]; [touchHandler touchesBegan:touches withEvent:event];
if ([[event allTouches] count] == 3) { // if ([[event allTouches] count] == 3) {
if (isInputingText) { // if (isInputingText) {
Log(LOG_D, @"Closing the keyboard"); // Log(LOG_D, @"Closing the keyboard");
[keyInputField resignFirstResponder]; // [keyInputField resignFirstResponder];
isInputingText = false; // isInputingText = false;
} else { // } else {
Log(LOG_D, @"Opening the keyboard"); // Log(LOG_D, @"Opening the keyboard");
// Prepare the textbox used to capture keyboard events. // // Prepare the textbox used to capture keyboard events.
keyInputField.delegate = self; // keyInputField.delegate = self;
keyInputField.text = @"0"; // keyInputField.text = @"0";
#if !TARGET_OS_TV //#if !TARGET_OS_TV
// Prepare the toolbar above the keyboard for more options // // Prepare the toolbar above the keyboard for more options
UIToolbar *customToolbarView = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 44)]; // UIToolbar *customToolbarView = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 44)];
//
UIBarButtonItem *doneBarButton = [self createButtonWithImageNamed:@"DoneIcon.png" backgroundColor:[UIColor clearColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x00 isToggleable:NO]; // UIBarButtonItem *doneBarButton = [self createButtonWithImageNamed:@"DoneIcon.png" backgroundColor:[UIColor clearColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x00 isToggleable:NO];
UIBarButtonItem *windowsBarButton = [self createButtonWithImageNamed:@"WindowsIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x5B isToggleable:YES]; // UIBarButtonItem *windowsBarButton = [self createButtonWithImageNamed:@"WindowsIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x5B isToggleable:YES];
UIBarButtonItem *tabBarButton = [self createButtonWithImageNamed:@"TabIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x09 isToggleable:NO]; // UIBarButtonItem *tabBarButton = [self createButtonWithImageNamed:@"TabIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x09 isToggleable:NO];
UIBarButtonItem *shiftBarButton = [self createButtonWithImageNamed:@"ShiftIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0xA0 isToggleable:YES]; // UIBarButtonItem *shiftBarButton = [self createButtonWithImageNamed:@"ShiftIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0xA0 isToggleable:YES];
UIBarButtonItem *escapeBarButton = [self createButtonWithImageNamed:@"EscapeIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x1B isToggleable:NO]; // UIBarButtonItem *escapeBarButton = [self createButtonWithImageNamed:@"EscapeIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x1B isToggleable:NO];
UIBarButtonItem *controlBarButton = [self createButtonWithImageNamed:@"ControlIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0xA2 isToggleable:YES]; // UIBarButtonItem *controlBarButton = [self createButtonWithImageNamed:@"ControlIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0xA2 isToggleable:YES];
UIBarButtonItem *altBarButton = [self createButtonWithImageNamed:@"AltIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0xA4 isToggleable:YES]; // UIBarButtonItem *altBarButton = [self createButtonWithImageNamed:@"AltIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0xA4 isToggleable:YES];
UIBarButtonItem *deleteBarButton = [self createButtonWithImageNamed:@"DeleteIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x2E isToggleable:NO]; // UIBarButtonItem *deleteBarButton = [self createButtonWithImageNamed:@"DeleteIcon.png" backgroundColor:[UIColor blackColor] target:self action:@selector(toolbarButtonClicked:) keyCode:0x2E isToggleable:NO];
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; // UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
//
[customToolbarView setItems:[NSArray arrayWithObjects:doneBarButton, windowsBarButton, escapeBarButton, tabBarButton, shiftBarButton, controlBarButton, altBarButton, deleteBarButton, flexibleSpace, nil]]; // [customToolbarView setItems:[NSArray arrayWithObjects:doneBarButton, windowsBarButton, escapeBarButton, tabBarButton, shiftBarButton, controlBarButton, altBarButton, deleteBarButton, flexibleSpace, nil]];
keyInputField.inputAccessoryView = customToolbarView; // keyInputField.inputAccessoryView = customToolbarView;
#endif //#endif
[keyInputField becomeFirstResponder]; // [keyInputField becomeFirstResponder];
[keyInputField addTarget:self action:@selector(onKeyboardPressed:) forControlEvents:UIControlEventEditingChanged]; // [keyInputField addTarget:self action:@selector(onKeyboardPressed:) forControlEvents:UIControlEventEditingChanged];
//
// Undo causes issues for our state management, so turn it off // // Undo causes issues for our state management, so turn it off
[keyInputField.undoManager disableUndoRegistration]; // [keyInputField.undoManager disableUndoRegistration];
//
isInputingText = true; // isInputingText = true;
} // }
} // }
} }
} }
@@ -509,6 +596,11 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
[self sendStylusEvent:touch]; [self sendStylusEvent:touch];
return; return;
} }
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
if (settings.absoluteTouchMode) {
[self trySendTouchEvent:touch index:0];
// return;
}
} }
UITouch *touch = [touches anyObject]; UITouch *touch = [touches anyObject];
@@ -596,6 +688,11 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
[self sendStylusEvent:touch]; [self sendStylusEvent:touch];
return; return;
} }
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
if (settings.absoluteTouchMode) {
[self trySendTouchEvent:touch index:0];
// return;
}
} }
} }
#endif #endif
@@ -616,6 +713,11 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
if (touch.type == UITouchTypePencil) { if (touch.type == UITouchTypePencil) {
[self sendStylusEvent:touch]; [self sendStylusEvent:touch];
} }
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
if (settings.absoluteTouchMode) {
[self trySendTouchEvent:touch index:0];
// return;
}
} }
} }
#endif #endif
+2 -2
View File
@@ -9,7 +9,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string> <string>Moonlight-阿西</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string> <string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@@ -69,7 +69,7 @@
<string>armv7</string> <string>armv7</string>
</array> </array>
<key>UIRequiresFullScreen</key> <key>UIRequiresFullScreen</key>
<true/> <false/>
<key>UIStatusBarHidden</key> <key>UIStatusBarHidden</key>
<true/> <true/>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
@@ -187,25 +187,25 @@
#endif #endif
// Only enable scroll and zoom in absolute touch mode // Only enable scroll and zoom in absolute touch mode
if (_settings.absoluteTouchMode) { // if (_settings.absoluteTouchMode) {
_scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame]; // _scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
#if !TARGET_OS_TV //#if !TARGET_OS_TV
[_scrollView.panGestureRecognizer setMinimumNumberOfTouches:2]; // [_scrollView.panGestureRecognizer setMinimumNumberOfTouches:2];
#endif //#endif
[_scrollView setShowsHorizontalScrollIndicator:NO]; // [_scrollView setShowsHorizontalScrollIndicator:NO];
[_scrollView setShowsVerticalScrollIndicator:NO]; // [_scrollView setShowsVerticalScrollIndicator:NO];
[_scrollView setDelegate:self]; // [_scrollView setDelegate:self];
[_scrollView setMaximumZoomScale:10.0f]; // [_scrollView setMaximumZoomScale:10.0f];
//
// Add StreamView inside a UIScrollView for absolute mode // // Add StreamView inside a UIScrollView for absolute mode
[_scrollView addSubview:_streamView]; // [_scrollView addSubview:_streamView];
[self.view addSubview:_scrollView]; // [self.view addSubview:_scrollView];
} // }
else { // else {
// Add StreamView directly in relative mode // // Add StreamView directly in relative mode
[self.view addSubview:_streamView]; // [self.view addSubview:_streamView];
} // }
[self.view addSubview:_streamView];
[self.view addSubview:_stageLabel]; [self.view addSubview:_stageLabel];
[self.view addSubview:_spinner]; [self.view addSubview:_spinner];
[self.view addSubview:_tipLabel]; [self.view addSubview:_tipLabel];
+1 -1
View File
@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Moonlight</string> <string>MoonlightAXI</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
+6 -3
View File
@@ -933,7 +933,6 @@
}; };
}; };
FB290CED19B2C406004C83CF = { FB290CED19B2C406004C83CF = {
DevelopmentTeam = DM46QST4M7;
LastSwiftMigration = 1140; LastSwiftMigration = 1140;
}; };
}; };
@@ -1378,6 +1377,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = U39XM5BN3U;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Limelight/Limelight-Prefix.pch"; GCC_PREFIX_HEADER = "Limelight/Limelight-Prefix.pch";
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
@@ -1388,6 +1388,7 @@
"$(PROJECT_DIR)/libs/**", "$(PROJECT_DIR)/libs/**",
); );
INFOPLIST_FILE = "Limelight/Limelight-Info.plist"; INFOPLIST_FILE = "Limelight/Limelight-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = MoonlightAXI;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@@ -1406,7 +1407,7 @@
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim", "$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim",
); );
MARKETING_VERSION = 9.0.0; MARKETING_VERSION = 9.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.iPadOS";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE = "";
SKIP_INSTALL = NO; SKIP_INSTALL = NO;
@@ -1427,6 +1428,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = U39XM5BN3U;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Limelight/Limelight-Prefix.pch"; GCC_PREFIX_HEADER = "Limelight/Limelight-Prefix.pch";
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
@@ -1437,6 +1439,7 @@
"$(PROJECT_DIR)/libs/**", "$(PROJECT_DIR)/libs/**",
); );
INFOPLIST_FILE = "Limelight/Limelight-Info.plist"; INFOPLIST_FILE = "Limelight/Limelight-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = MoonlightAXI;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@@ -1455,7 +1458,7 @@
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim", "$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim",
); );
MARKETING_VERSION = 9.0.0; MARKETING_VERSION = 9.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.iPadOS";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE = "";
SKIP_INSTALL = NO; SKIP_INSTALL = NO;