mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-18 14:41:14 +00:00
Display error codes when the connection is terminated
This commit is contained in:
@@ -439,9 +439,21 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
|
NSString* errorString;
|
||||||
|
if (abs(errorCode) > 1000) {
|
||||||
|
// We'll assume large errors are hex values
|
||||||
|
errorString = [NSString stringWithFormat:@"%08X", (uint32_t)errorCode];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Smaller values will just be printed as decimal (probably errno.h values)
|
||||||
|
errorString = [NSString stringWithFormat:@"%d", errorCode];
|
||||||
|
}
|
||||||
|
|
||||||
title = @"Connection Terminated";
|
title = @"Connection Terminated";
|
||||||
message = @"The connection was terminated";
|
message = [NSString stringWithFormat: @"The connection was terminated\n\nError code: %@", errorString];
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Submodule moonlight-common/moonlight-common-c updated: 3ed3ba6253...3aae4cdc59
Reference in New Issue
Block a user