mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-04 00:36:23 +00:00
Attempt to fix Apple's concerns about cloud streaming
This commit is contained in:
parent
059a943a3d
commit
39c03bc8a8
@ -109,7 +109,7 @@ static const int LABEL_DY = 20;
|
|||||||
[self addTarget:self action:@selector(addClicked) forControlEvents:UIControlEventTouchUpInside];
|
[self addTarget:self action:@selector(addClicked) forControlEvents:UIControlEventTouchUpInside];
|
||||||
}
|
}
|
||||||
|
|
||||||
[_hostLabel setText:@"Add Host"];
|
[_hostLabel setText:@"Add Host Manually"];
|
||||||
[_hostLabel sizeToFit];
|
[_hostLabel sizeToFit];
|
||||||
|
|
||||||
[_hostOverlay setImage:[UIImage imageNamed:@"AddOverlayIcon"]];
|
[_hostOverlay setImage:[UIImage imageNamed:@"AddOverlayIcon"]];
|
||||||
|
@ -127,6 +127,18 @@ static NSMutableSet* hostList;
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)updateTitle {
|
||||||
|
if (_selectedHost != nil) {
|
||||||
|
self.title = _selectedHost.name;
|
||||||
|
}
|
||||||
|
else if ([hostList count] == 0) {
|
||||||
|
self.title = @"Searching for PCs on your network...";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
self.title = @"Select Host";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)alreadyPaired {
|
- (void)alreadyPaired {
|
||||||
BOOL usingCachedAppList = false;
|
BOOL usingCachedAppList = false;
|
||||||
|
|
||||||
@ -266,7 +278,7 @@ static NSMutableSet* hostList;
|
|||||||
_selectedHost = nil;
|
_selectedHost = nil;
|
||||||
_sortedAppList = nil;
|
_sortedAppList = nil;
|
||||||
|
|
||||||
self.title = @"Select Host";
|
[self updateTitle];
|
||||||
[self disableUpButton];
|
[self disableUpButton];
|
||||||
|
|
||||||
[self.collectionView reloadData];
|
[self.collectionView reloadData];
|
||||||
@ -304,7 +316,7 @@ static NSMutableSet* hostList;
|
|||||||
|
|
||||||
Log(LOG_D, @"Clicked host: %@", host.name);
|
Log(LOG_D, @"Clicked host: %@", host.name);
|
||||||
_selectedHost = host;
|
_selectedHost = host;
|
||||||
self.title = host.name;
|
[self updateTitle];
|
||||||
[self enableUpButton];
|
[self enableUpButton];
|
||||||
[self disableNavigation];
|
[self disableNavigation];
|
||||||
|
|
||||||
@ -483,7 +495,7 @@ static NSMutableSet* hostList;
|
|||||||
|
|
||||||
- (void) addHostClicked {
|
- (void) addHostClicked {
|
||||||
Log(LOG_D, @"Clicked add host");
|
Log(LOG_D, @"Clicked add host");
|
||||||
UIAlertController* alertController = [UIAlertController alertControllerWithTitle:@"Host Address" message:@"Please enter a hostname or IP address" preferredStyle:UIAlertControllerStyleAlert];
|
UIAlertController* alertController = [UIAlertController alertControllerWithTitle:@"Add Host Manually" message:@"If Moonlight doesn't find your local gaming PC automatically,\nenter the IP address of your PC" preferredStyle:UIAlertControllerStyleAlert];
|
||||||
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||||
[alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
[alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||||
NSString* hostAddress = ((UITextField*)[[alertController textFields] objectAtIndex:0]).text;
|
NSString* hostAddress = ((UITextField*)[[alertController textFields] objectAtIndex:0]).text;
|
||||||
@ -497,7 +509,7 @@ static NSMutableSet* hostList;
|
|||||||
[self updateHosts];
|
[self updateHosts];
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
UIAlertController* hostNotFoundAlert = [UIAlertController alertControllerWithTitle:@"Add Host" message:error preferredStyle:UIAlertControllerStyleAlert];
|
UIAlertController* hostNotFoundAlert = [UIAlertController alertControllerWithTitle:@"Add Host Manually" message:error preferredStyle:UIAlertControllerStyleAlert];
|
||||||
[Utils addHelpOptionToDialog:hostNotFoundAlert];
|
[Utils addHelpOptionToDialog:hostNotFoundAlert];
|
||||||
[hostNotFoundAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
[hostNotFoundAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
@ -815,7 +827,7 @@ static NSMutableSet* hostList;
|
|||||||
[self hostClicked:[hostList anyObject] view:nil];
|
[self hostClicked:[hostList anyObject] view:nil];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
self.title = @"Select Host";
|
[self updateTitle];
|
||||||
[self.view addSubview:hostScrollView];
|
[self.view addSubview:hostScrollView];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1045,6 +1057,9 @@ static NSMutableSet* hostList;
|
|||||||
// Create or delete host shortcuts as needed
|
// Create or delete host shortcuts as needed
|
||||||
[self updateHostShortcuts];
|
[self updateHostShortcuts];
|
||||||
|
|
||||||
|
// Update the title in case we now have a PC
|
||||||
|
[self updateTitle];
|
||||||
|
|
||||||
prevEdge = [self getCompViewX:addComp addComp:addComp prevEdge:prevEdge];
|
prevEdge = [self getCompViewX:addComp addComp:addComp prevEdge:prevEdge];
|
||||||
addComp.center = CGPointMake(prevEdge, hostScrollView.frame.size.height / 2);
|
addComp.center = CGPointMake(prevEdge, hostScrollView.frame.size.height / 2);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user