mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-01 15:25:59 +00:00
Display error codes when the connection is terminated
This commit is contained in:
parent
a102ec4ee8
commit
69387c32ad
@ -2371,7 +2371,16 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
message = getResources().getString(R.string.conn_terminated_msg);
|
String errorCodeString;
|
||||||
|
// We'll assume large errors are hex values
|
||||||
|
if (Math.abs(errorCode) > 1000) {
|
||||||
|
errorCodeString = Integer.toHexString(errorCode);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
errorCodeString = Integer.toString(errorCode);
|
||||||
|
}
|
||||||
|
message = getResources().getString(R.string.conn_terminated_msg) + "\n\n" +
|
||||||
|
getResources().getString(R.string.error_code_prefix) + " " + errorCodeString;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,8 @@
|
|||||||
<string name="conn_error_title">Connection Error</string>
|
<string name="conn_error_title">Connection Error</string>
|
||||||
<string name="conn_error_msg">Failed to start</string>
|
<string name="conn_error_msg">Failed to start</string>
|
||||||
<string name="conn_terminated_title">Connection Terminated</string>
|
<string name="conn_terminated_title">Connection Terminated</string>
|
||||||
<string name="conn_terminated_msg">The connection was terminated</string>
|
<string name="conn_terminated_msg">The connection was terminated.</string>
|
||||||
|
<string name="error_code_prefix">Error code:</string>
|
||||||
|
|
||||||
<!-- General strings -->
|
<!-- General strings -->
|
||||||
<string name="ip_hint">IP address of host PC</string>
|
<string name="ip_hint">IP address of host PC</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user