From ce9e91153e05b1629fa4ceecd344036c84b36562 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 25 Apr 2020 16:10:44 -0700 Subject: [PATCH] Add special error text for the -1 launch error code --- .../main/java/com/limelight/nvstream/http/NvHTTP.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/limelight/nvstream/http/NvHTTP.java b/app/src/main/java/com/limelight/nvstream/http/NvHTTP.java index 9729b9c5..648bf0d5 100644 --- a/app/src/main/java/com/limelight/nvstream/http/NvHTTP.java +++ b/app/src/main/java/com/limelight/nvstream/http/NvHTTP.java @@ -192,7 +192,14 @@ public class NvHTTP { // the resulting long into an int. int statusCode = (int)Long.parseLong(xpp.getAttributeValue(XmlPullParser.NO_NAMESPACE, "status_code")); if (statusCode != 200) { - throw new GfeHttpResponseException(statusCode, xpp.getAttributeValue(XmlPullParser.NO_NAMESPACE, "status_message")); + String statusMsg = xpp.getAttributeValue(XmlPullParser.NO_NAMESPACE, "status_message"); + if (statusCode == -1 && "Invalid".equals(statusMsg)) { + // Special case handling an audio capture error which GFE doesn't + // provide any useful status message for. + statusCode = 418; + statusMsg = "Missing audio capture device. Reinstall GeForce Experience."; + } + throw new GfeHttpResponseException(statusCode, statusMsg); } }