Add a friendly error message when no video traffic is received

This commit is contained in:
Cameron Gutman
2020-05-01 21:28:48 -07:00
parent 2fdabe37aa
commit 417aa2815c
2 changed files with 12 additions and 2 deletions

View File

@@ -68,9 +68,19 @@ void Session::clStageFailed(int stage, int errorCode)
void Session::clConnectionTerminated(int errorCode)
{
// Display the termination dialog if this was not intended
if (errorCode != 0) {
switch (errorCode) {
case ML_ERROR_GRACEFUL_TERMINATION:
break;
case ML_ERROR_NO_VIDEO_TRAFFIC:
s_ActiveSession->m_UnexpectedTermination = true;
emit s_ActiveSession->displayLaunchError("No video received from host. Check the host PC's firewall and port forwarding rules.");
break;
default:
s_ActiveSession->m_UnexpectedTermination = true;
emit s_ActiveSession->displayLaunchError("Connection terminated");
break;
}
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,