mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Add a friendly error message when no video traffic is received
This commit is contained in:
@@ -68,9 +68,19 @@ void Session::clStageFailed(int stage, int errorCode)
|
|||||||
void Session::clConnectionTerminated(int errorCode)
|
void Session::clConnectionTerminated(int errorCode)
|
||||||
{
|
{
|
||||||
// Display the termination dialog if this was not intended
|
// 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;
|
s_ActiveSession->m_UnexpectedTermination = true;
|
||||||
emit s_ActiveSession->displayLaunchError("Connection terminated");
|
emit s_ActiveSession->displayLaunchError("Connection terminated");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
|||||||
Submodule moonlight-common-c/moonlight-common-c updated: 9ffdc79b6f...f596e80575
Reference in New Issue
Block a user