Merge branch 'Moonlight-iOS-Official9.0.2' into Moonlight-iOS-ZWM2

* Moonlight-iOS-Official9.0.2: (29 commits)
  Update README.md
  Update README.md
  Update README.md
  Update README.md
  Update README.md
  Update README.md
  Update README.md
  Update README.md
  Update README.md
  Version 9.0.2
  Update moonlight-common-c to resolve build warning
  Improve smooth scrolling precision
  mapped the Globe/Language key to Escape
  yes 0x0D is the correct code for Enter according to Microsoft's documentation
  Update moonlight-common-c with RTSP encryption and QoS improvements
  Remove xcpretty in CI
  Update AppVeyor images
  Remove CPU core count check
  Update moonlight-common-c with finalized encryption changes
  Opt in for video encryption on A10 and later SoCs
  ...

# Conflicts:
#	Limelight/Input/StreamView.m
#	Moonlight-ZWM.xcodeproj/project.pbxproj
This commit is contained in:
ZWM
2024-04-30 18:23:11 +08:00
10 changed files with 2711 additions and 37 deletions
+4 -1
View File
@@ -201,7 +201,7 @@
keyCode = 0x6B;
break;
case UIKeyboardHIDUsageKeypadEnter:
keyCode = 0x0D; // FIXME: Is this correct?
keyCode = 0x0D;
break;
case UIKeyboardHIDUsageKeypadPeriod:
keyCode = 0x6E;
@@ -248,6 +248,9 @@
case UIKeyboardHIDUsageKeyboardRightAlt:
keyCode = 0xA5;
break;
case 669: // This value corresponds to the "Globe" or "Language" key on most Apple branded iPad keyboards.
keyCode = 0x1B; // This value corresponds to "Escape", which is missing from most Apple branded iPad keyboards.
break;
default:
NSLog(@"Unhandled HID usage: %lu", (unsigned long)key.keyCode);
assert(0);
+26 -16
View File
@@ -323,6 +323,12 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
- (void)sendStylusEvent:(UITouch*)event {
uint8_t type;
// Don't touch stylus events if the host doesn't support them. We want to pass
// them as normal touches for legacy hosts that don't understand pen events.
if (!(LiGetHostFeatureFlags() & LI_FF_PEN_TOUCH_EVENTS)) {
return NO;
}
switch (event.phase) {
case UITouchPhaseBegan:
type = LI_TOUCH_EVENT_DOWN;
@@ -337,17 +343,17 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
type = LI_TOUCH_EVENT_CANCEL;
break;
default:
return;
return YES;
}
CGPoint location = [self adjustCoordinatesForVideoArea:[event locationInView:self]];
CGSize videoSize = [self getVideoAreaSize];
LiSendPenEvent(type, LI_TOOL_TYPE_PEN, 0, location.x / videoSize.width, location.y / videoSize.height,
(event.force / event.maximumPossibleForce) / sin(event.altitudeAngle),
0.0f, 0.0f,
[self getRotationFromAzimuthAngle:[event azimuthAngleInView:self]],
[self getTiltFromAltitudeAngle:event.altitudeAngle]);
return LiSendPenEvent(type, LI_TOOL_TYPE_PEN, 0, location.x / videoSize.width, location.y / videoSize.height,
(event.force / event.maximumPossibleForce) / sin(event.altitudeAngle),
0.0f, 0.0f,
[self getRotationFromAzimuthAngle:[event azimuthAngleInView:self]],
[self getTiltFromAltitudeAngle:event.altitudeAngle]) != LI_ERR_UNSUPPORTED;
}
- (void)sendStylusHoverEvent:(UIHoverGestureRecognizer*)gesture API_AVAILABLE(ios(13.0)) {
@@ -425,8 +431,9 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
// }
for (UITouch* touch in touches) {
if (touch.type == UITouchTypePencil) {
[self sendStylusEvent:touch];
return;
if ([self sendStylusEvent:touch]) {
return;
}
}
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
if (settings.absoluteTouchMode) {
@@ -607,8 +614,9 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
if (@available(iOS 13.4, *)) {
for (UITouch* touch in touches) {
if (touch.type == UITouchTypePencil) {
[self sendStylusEvent:touch];
return;
if ([self sendStylusEvent:touch]) {
return;
}
}
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
if (settings.absoluteTouchMode) {
@@ -699,8 +707,9 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
if (@available(iOS 13.4, *)) {
for (UITouch* touch in touches) {
if (touch.type == UITouchTypePencil) {
[self sendStylusEvent:touch];
return;
if ([self sendStylusEvent:touch]) {
return;
}
}
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
if (settings.absoluteTouchMode) {
@@ -811,20 +820,21 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
}
CGPoint currentScrollTranslation = [gesture translationInView:self];
const short translationMultiplier = 120 * 20; // WHEEL_DELTA * 20
{
short translationDeltaY = ((currentScrollTranslation.y - lastScrollTranslation.y) / self.bounds.size.height) * 120; // WHEEL_DELTA
short translationDeltaY = ((currentScrollTranslation.y - lastScrollTranslation.y) / self.bounds.size.height) * translationMultiplier;
if (translationDeltaY != 0) {
LiSendHighResScrollEvent(translationDeltaY * 20);
LiSendHighResScrollEvent(translationDeltaY);
lastScrollTranslation = currentScrollTranslation;
}
}
{
short translationDeltaX = ((currentScrollTranslation.x - lastScrollTranslation.x) / self.bounds.size.width) * 120; // WHEEL_DELTA
short translationDeltaX = ((currentScrollTranslation.x - lastScrollTranslation.x) / self.bounds.size.width) * translationMultiplier;
if (translationDeltaX != 0) {
// Direction is reversed from vertical scrolling
LiSendHighResHScrollEvent(-translationDeltaX * 20);
LiSendHighResHScrollEvent(-translationDeltaX);
lastScrollTranslation = currentScrollTranslation;
}
}
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -276,7 +276,7 @@
// indicated by a negative version in the last field.
int fps = (config.frameRate > 60 && ![config.appVersion containsString:@".-"]) ? 0 : config.frameRate;
NSString* urlString = [NSString stringWithFormat:@"%@/%@?uniqueid=%@&appid=%@&mode=%dx%dx%d&additionalStates=1&sops=%d&rikey=%@&rikeyid=%d%@&localAudioPlayMode=%d&surroundAudioInfo=%d&remoteControllersBitmap=%d&gcmap=%d&gcpersist=%d",
NSString* urlString = [NSString stringWithFormat:@"%@/%@?uniqueid=%@&appid=%@&mode=%dx%dx%d&additionalStates=1&sops=%d&rikey=%@&rikeyid=%d%@&localAudioPlayMode=%d&surroundAudioInfo=%d&remoteControllersBitmap=%d&gcmap=%d&gcpersist=%d%s",
_baseHTTPSURL, verb, _uniqueId,
config.appID,
config.width, config.height, fps,
@@ -286,7 +286,8 @@
config.playAudioOnPC ? 1 : 0,
SURROUNDAUDIOINFO_FROM_AUDIO_CONFIGURATION(config.audioConfiguration),
config.gamepadMask, config.gamepadMask,
!config.multiController ? 1 : 0];
!config.multiController ? 1 : 0,
LiGetLaunchUrlQueryParameters()];
Log(LOG_I, @"Requesting: %@", urlString);
// This blocks while the app is launching
return [self createRequestFromString:urlString timeout:LONG_TIMEOUT_SEC];
+4 -3
View File
@@ -420,9 +420,10 @@ void ClSetControllerLED(uint16_t controllerNumber, uint8_t r, uint8_t g, uint8_t
_streamConfig.supportedVideoFormats = config.supportedVideoFormats;
_streamConfig.audioConfiguration = config.audioConfiguration;
// TODO: If/when video encryption is added, we'll probably want to
// limit that to devices that support the ARMv8 AES instructions.
_streamConfig.encryptionFlags = ENCFLG_AUDIO;
// Since we require iOS 12 or above, we're guaranteed to be running
// on a 64-bit device with ARMv8 crypto instructions, so we don't
// need to check for that here.
_streamConfig.encryptionFlags = ENCFLG_ALL;
if ([Utils isActiveNetworkVPN]) {
// Force remote streaming mode when a VPN is connected
@@ -439,9 +439,21 @@
break;
default:
{
NSString* errorString;
if (abs(errorCode) > 1000) {
// We'll assume large errors are hex values
errorString = [NSString stringWithFormat:@"%08X", (uint32_t)errorCode];
}
else {
// Smaller values will just be printed as decimal (probably errno.h values)
errorString = [NSString stringWithFormat:@"%d", errorCode];
}
title = @"Connection Terminated";
message = @"The connection was terminated";
message = [NSString stringWithFormat: @"The connection was terminated\n\nError code: %@", errorString];
break;
}
}
}
+4 -4
View File
@@ -1191,7 +1191,7 @@
"$(PROJECT_DIR)/libs/SDL2/lib/tvOS-Sim",
"$(PROJECT_DIR)/libs/FFmpeg/lib/tvOS-Sim",
);
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.2;
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1247,7 +1247,7 @@
"$(PROJECT_DIR)/libs/SDL2/lib/tvOS-Sim",
"$(PROJECT_DIR)/libs/FFmpeg/lib/tvOS-Sim",
);
MARKETING_VERSION = 9.0.0;
MARKETING_VERSION = 9.0.2;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1406,8 +1406,8 @@
"$(PROJECT_DIR)/libs/SDL2/lib/iOS-Sim",
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim",
);
MARKETING_VERSION = 9.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-zwm.iPadOS";
MARKETING_VERSION = 9.0.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-stream.Moonlight";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SKIP_INSTALL = NO;
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -4,11 +4,11 @@ clone_depth: 1
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: macOS-Monterey
- APPVEYOR_BUILD_WORKER_IMAGE: macOS-Sonoma
SCHEME: Moonlight
SDK: iphonesimulator
PLATFORM: iOS
- APPVEYOR_BUILD_WORKER_IMAGE: macOS-Monterey
- APPVEYOR_BUILD_WORKER_IMAGE: macOS-Sonoma
SCHEME: Moonlight TV
SDK: appletvsimulator
PLATFORM: tvOS
@@ -18,7 +18,7 @@ before_build:
- sh: 'xcodebuild -downloadPlatform $PLATFORM'
build_script:
- sh: set -o pipefail && xcodebuild -project Moonlight.xcodeproj -scheme "$SCHEME" -configuration Debug -sdk $SDK clean build | xcpretty
- sh: set -o pipefail && xcodebuild -project Moonlight.xcodeproj -scheme "$SCHEME" -configuration Release -sdk $SDK clean build | xcpretty
- sh: xcodebuild -project Moonlight.xcodeproj -scheme "$SCHEME" -configuration Debug -sdk $SDK clean build
- sh: xcodebuild -project Moonlight.xcodeproj -scheme "$SCHEME" -configuration Release -sdk $SDK clean build
deploy: off
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -364,7 +364,8 @@
FB290E2619B37A4E004C83CF /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1400;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "Moonlight Stream";
TargetAttributes = {
FB1A67EE21324EE300507771 = {
@@ -484,14 +485,11 @@
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = DM46QST4M7;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
HEADER_SEARCH_PATHS = (
"moonlight-common-c/enet/include",
"../libs/**",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "-ObjC";
@@ -521,6 +519,7 @@
"moonlight-common-c/enet/include",
"../libs/**",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "-ObjC";
@@ -565,8 +564,10 @@
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
ENABLE_MODULE_VERIFIER = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -575,6 +576,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
LC_DEBUG,
"DEBUG=1",
__APPLE_USE_RFC_3542,
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
@@ -585,6 +587,8 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SKIP_INSTALL = YES;
@@ -624,11 +628,17 @@
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
ENABLE_MODULE_VERIFIER = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
__APPLE_USE_RFC_3542,
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -636,6 +646,8 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
PROVISIONING_PROFILE = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
@@ -652,6 +664,7 @@
"../libs/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
@@ -669,6 +682,7 @@
"../libs/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;