diff --git a/Limelight/ViewControllers/StreamFrameViewController.m b/Limelight/ViewControllers/StreamFrameViewController.m index 07446385..a85d8ab1 100644 --- a/Limelight/ViewControllers/StreamFrameViewController.m +++ b/Limelight/ViewControllers/StreamFrameViewController.m @@ -236,15 +236,34 @@ dispatch_async(dispatch_get_main_queue(), ^{ // Allow the display to go to sleep now [UIApplication sharedApplication].idleTimerDisabled = NO; - if (errorCode == 0) { - [self returnToMainFrame]; - } else { - UIAlertController* conTermAlert = [UIAlertController alertControllerWithTitle:@"Connection Terminated" message:@"The connection was terminated" preferredStyle:UIAlertControllerStyleAlert]; - [conTermAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ + + NSString* title; + NSString* message; + + switch (errorCode) { + case ML_ERROR_GRACEFUL_TERMINATION: [self returnToMainFrame]; - }]]; - [self presentViewController:conTermAlert animated:YES completion:nil]; + return; + + case ML_ERROR_NO_VIDEO_TRAFFIC: + title = @"Connection Error"; + message = @"No video received from host. Check the host PC's firewall and port forwarding rules."; + break; + + default: + title = @"Connection Terminated"; + message = @"The connection was terminated"; + break; } + + UIAlertController* conTermAlert = [UIAlertController alertControllerWithTitle:title + message:message + preferredStyle:UIAlertControllerStyleAlert]; + [Utils addHelpOptionToDialog:conTermAlert]; + [conTermAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ + [self returnToMainFrame]; + }]]; + [self presentViewController:conTermAlert animated:YES completion:nil]; }); [_streamMan stopStream]; diff --git a/moonlight-common/moonlight-common-c b/moonlight-common/moonlight-common-c index 247b1fe0..b46e06fc 160000 --- a/moonlight-common/moonlight-common-c +++ b/moonlight-common/moonlight-common-c @@ -1 +1 @@ -Subproject commit 247b1fe0e32d80ce02ede4c2b4a835b9c085abe4 +Subproject commit b46e06fcf1b289bb6a3b2307c10e1a7274c5f3b5