mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-26 06:02:32 +00:00
Add support for GFE 2.8
This commit is contained in:
parent
ea3be613c5
commit
2f31f93bf8
@ -38,7 +38,7 @@
|
||||
return;
|
||||
}
|
||||
if ([serverInfoResp isStatusOk]) {
|
||||
if (![[serverInfoResp getStringTag:@"currentgame"] isEqual:@"0"]) {
|
||||
if (![[serverInfoResp getStringTag:@"state"] hasSuffix:@"_SERVER_AVAILABLE"]) {
|
||||
[_callback pairFailed:@"You must stop streaming before attempting to pair."];
|
||||
} else if (![[serverInfoResp getStringTag:@"PairStatus"] isEqual:@"1"]) {
|
||||
[self initiatePair];
|
||||
|
@ -48,11 +48,11 @@
|
||||
ServerInfoResponse* serverInfoResp = [[ServerInfoResponse alloc] init];
|
||||
[hMan executeRequestSynchronously:[HttpRequest requestForResponse:serverInfoResp withUrlRequest:[hMan newServerInfoRequest]
|
||||
fallbackError:401 fallbackRequest:[hMan newHttpServerInfoRequest]]];
|
||||
NSString* currentGame = [serverInfoResp getStringTag:@"currentgame"];
|
||||
NSString* pairStatus = [serverInfoResp getStringTag:@"PairStatus"];
|
||||
NSString* currentClient = [serverInfoResp getStringTag:@"CurrentClient"];
|
||||
NSString* appversion = [serverInfoResp getStringTag:@"appversion"];
|
||||
if (![serverInfoResp isStatusOk] || currentGame == NULL || pairStatus == NULL || appversion == NULL) {
|
||||
NSString* serverState = [serverInfoResp getStringTag:@"state"];
|
||||
if (![serverInfoResp isStatusOk] || pairStatus == NULL || appversion == NULL || serverState == NULL) {
|
||||
[_callbacks launchFailed:@"Failed to connect to PC"];
|
||||
return;
|
||||
}
|
||||
@ -64,7 +64,7 @@
|
||||
}
|
||||
|
||||
// resumeApp and launchApp handle calling launchFailed
|
||||
if (![currentGame isEqualToString:@"0"]) {
|
||||
if ([serverState hasSuffix:@"_SERVER_BUSY"]) {
|
||||
if (![currentClient isEqualToString:@"1"]) {
|
||||
// The server is streaming to someone else
|
||||
[_callbacks launchFailed:@"There is another stream in progress"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user