mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-10-26 14:00:00 +00:00
Use LiStringifyPortFlags() rather than coding it ourselves
This commit is contained in:
1 parent
8b8bc2f818
commit
f09b2fd222
2 files changed
+4
-11
No files matched your search
@@ -509,16 +509,9 @@ static NSMutableSet* hostList;
|
|||||||
message = @"The network test could not be performed because none of Moonlight's connection testing servers were reachable. Check your Internet connection or try again later.";
|
message = @"The network test could not be performed because none of Moonlight's connection testing servers were reachable. Check your Internet connection or try again later.";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message = @"Your current network connection seems to be blocking Moonlight. Streaming may not work while connected to this network.\n\nThe following network ports were blocked:\n";
|
char blockedPorts[512];
|
||||||
|
LiStringifyPortFlags(portTestResult, "\n", blockedPorts, sizeof(blockedPorts));
|
||||||
for (int i = 0; i < 32; i++) {
|
message = [NSString stringWithFormat:@"Your current network connection seems to be blocking Moonlight. Streaming may not work while connected to this network.\n\nThe following network ports were blocked:\n%s", blockedPorts];
|
||||||
if (portTestResult & (1 << i)) {
|
|
||||||
NSString* portString = [NSString stringWithFormat:@"%s %u\n",
|
|
||||||
LiGetProtocolFromPortFlagIndex(i) == 17 ? "UDP" : "TCP",
|
|
||||||
LiGetPortFromPortFlagIndex(i)];
|
|
||||||
message = [message stringByAppendingString:portString];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIAlertController* netTestAlert = [UIAlertController alertControllerWithTitle:@"Network Test Complete" message:message preferredStyle:UIAlertControllerStyleAlert];
|
UIAlertController* netTestAlert = [UIAlertController alertControllerWithTitle:@"Network Test Complete" message:message preferredStyle:UIAlertControllerStyleAlert];
|
||||||
|
|||||||
Submodule moonlight-common/moonlight-common-c updated: ce546b12b0...cca2ba9aab.
Reference in new issue
Block a user