mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 14:11:35 +00:00
Allow waking non-paired hosts
This commit is contained in:
@@ -382,9 +382,7 @@ static NSMutableSet* hostList;
|
|||||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"Wake" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"Wake" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||||
UIAlertController* wolAlert = [UIAlertController alertControllerWithTitle:@"Wake On LAN" message:@"" preferredStyle:UIAlertControllerStyleAlert];
|
UIAlertController* wolAlert = [UIAlertController alertControllerWithTitle:@"Wake On LAN" message:@"" preferredStyle:UIAlertControllerStyleAlert];
|
||||||
[wolAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
[wolAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||||
if (host.pairState != PairStatePaired) {
|
if (host.mac == nil || [host.mac isEqualToString:@"00:00:00:00:00:00"]) {
|
||||||
wolAlert.message = @"Cannot wake host because you are not paired";
|
|
||||||
} else if (host.mac == nil || [host.mac isEqualToString:@"00:00:00:00:00:00"]) {
|
|
||||||
wolAlert.message = @"Host MAC unknown, unable to send WOL Packet";
|
wolAlert.message = @"Host MAC unknown, unable to send WOL Packet";
|
||||||
} else {
|
} else {
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||||
|
|||||||
Reference in New Issue
Block a user