mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-07 00:16:15 +00:00
Display error codes when the connection is terminated
This commit is contained in:
@@ -2371,7 +2371,16 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user