TEMP
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:
commit
8dc445e744
10 files changed
+2711
-37
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user