From 2ec6639351b9a97090fd773c4c8c27f134c520b2 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 25 Apr 2020 16:29:47 -0700 Subject: [PATCH] Add special error text for the -1 launch error code --- Limelight/Network/HttpResponse.m | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Limelight/Network/HttpResponse.m b/Limelight/Network/HttpResponse.m index b9ddcd5..5cb398d 100644 --- a/Limelight/Network/HttpResponse.m +++ b/Limelight/Network/HttpResponse.m @@ -61,15 +61,20 @@ } xmlChar* statusMsgXml = xmlGetProp(node, (const xmlChar*)[TAG_STATUS_MESSAGE UTF8String]); - NSString* statusMsg; if (statusMsgXml != NULL) { - statusMsg = [NSString stringWithUTF8String:(const char*)statusMsgXml]; + self.statusMessage = [NSString stringWithUTF8String:(const char*)statusMsgXml]; xmlFree(statusMsgXml); } else { - statusMsg = @"Server Error"; + self.statusMessage = @"Server Error"; + } + + if (self.statusCode == -1 && [self.statusMessage isEqualToString:@"Invalid"]) { + // Special case handling an audio capture error which GFE doesn't + // provide any useful status message for. + self.statusCode = 418; + self.statusMessage = @"Missing audio capture device. Reinstalling GeForce Experience should resolve this error."; } - self.statusMessage = statusMsg; node = node->children;