diff --git a/app/src/main/java/com/limelight/Game.java b/app/src/main/java/com/limelight/Game.java index 36c3f230..e6a52b77 100644 --- a/app/src/main/java/com/limelight/Game.java +++ b/app/src/main/java/com/limelight/Game.java @@ -1549,11 +1549,16 @@ public class Game extends Activity implements SurfaceHolder.Callback, } String dialogText = getResources().getString(R.string.conn_error_msg) + " " + stage +" (error "+errorCode+")"; + + if (portFlags != 0) { + dialogText += "\n\n" + getResources().getString(R.string.check_ports_msg) + "\n" + + MoonBridge.stringifyPortFlags(portFlags, "\n"); + } + if (portTestResult != MoonBridge.ML_TEST_RESULT_INCONCLUSIVE && portTestResult != 0) { dialogText += "\n\n" + getResources().getString(R.string.nettest_text_blocked); } - Dialog.displayDialog(Game.this, getResources().getString(R.string.conn_error_title), dialogText, true); } } @@ -1564,8 +1569,8 @@ public class Game extends Activity implements SurfaceHolder.Callback, public void connectionTerminated(final int errorCode) { // Perform a connection test if the failure could be due to a blocked port // This does network I/O, so don't do it on the main thread. - final int portTestResult = MoonBridge.testClientConnectivity(ServerHelper.CONNECTION_TEST_SERVER, - 443, MoonBridge.getPortFlagsFromTerminationErrorCode(errorCode)); + final int portFlags = MoonBridge.getPortFlagsFromTerminationErrorCode(errorCode); + final int portTestResult = MoonBridge.testClientConnectivity(ServerHelper.CONNECTION_TEST_SERVER,443, portFlags); runOnUiThread(new Runnable() { @Override @@ -1606,6 +1611,11 @@ public class Game extends Activity implements SurfaceHolder.Callback, } } + if (portFlags != 0) { + message += "\n\n" + getResources().getString(R.string.check_ports_msg) + "\n" + + MoonBridge.stringifyPortFlags(portFlags, "\n"); + } + Dialog.displayDialog(Game.this, getResources().getString(R.string.conn_terminated_title), message, true); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a5376e22..77dc03f4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -74,8 +74,9 @@ USB access is prohibited by your device administrator. Check your Knox or MDM settings. Your current launcher does not allow for creating pinned shortcuts. Video decoder failed to initialize. Your device may not support the selected resolution or frame rate. - No video received from host. Check the host PC\'s firewall and port forwarding rules. + No video received from host. Your network connection isn\'t performing well. Reduce your video bitrate setting or try a faster connection. + Check your firewall and port forwarding rules for port(s): Establishing Connection