mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-04 06:56:06 +00:00
Add a friendly error message when no video traffic is received
This commit is contained in:
@@ -1538,9 +1538,21 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
|
||||
// Display the error dialog if it was an unexpected termination.
|
||||
// Otherwise, just finish the activity immediately.
|
||||
if (errorCode != 0) {
|
||||
if (errorCode != MoonBridge.ML_ERROR_GRACEFUL_TERMINATION) {
|
||||
String message;
|
||||
|
||||
switch (errorCode) {
|
||||
case MoonBridge.ML_ERROR_NO_VIDEO_TRAFFIC:
|
||||
message = getResources().getString(R.string.no_video_received_error);
|
||||
break;
|
||||
|
||||
default:
|
||||
message = getResources().getString(R.string.conn_terminated_msg);
|
||||
break;
|
||||
}
|
||||
|
||||
Dialog.displayDialog(Game.this, getResources().getString(R.string.conn_terminated_title),
|
||||
getResources().getString(R.string.conn_terminated_msg), true);
|
||||
message, true);
|
||||
}
|
||||
else {
|
||||
finish();
|
||||
|
||||
Reference in New Issue
Block a user