diff --git a/app/src/main/java/com/limelight/PcView.java b/app/src/main/java/com/limelight/PcView.java index b6206c37..84d05e36 100644 --- a/app/src/main/java/com/limelight/PcView.java +++ b/app/src/main/java/com/limelight/PcView.java @@ -412,7 +412,8 @@ public class PcView extends Activity implements AdapterFragmentCallbacks { // Spin the dialog off in a thread because it blocks Dialog.displayDialog(PcView.this, getResources().getString(R.string.pair_pairing_title), - getResources().getString(R.string.pair_pairing_msg)+" "+pinStr, false); + getResources().getString(R.string.pair_pairing_msg)+" "+pinStr+"\n\n"+ + getResources().getString(R.string.pair_pairing_help), false); PairingManager pm = httpConn.getPairingManager(); diff --git a/app/src/main/java/com/limelight/nvstream/NvConnection.java b/app/src/main/java/com/limelight/nvstream/NvConnection.java index 87031d5f..99fcee89 100644 --- a/app/src/main/java/com/limelight/nvstream/NvConnection.java +++ b/app/src/main/java/com/limelight/nvstream/NvConnection.java @@ -15,7 +15,6 @@ import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; -import java.net.UnknownHostException; import java.nio.ByteBuffer; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; @@ -33,7 +32,7 @@ import com.limelight.LimeLog; import com.limelight.nvstream.av.audio.AudioRenderer; import com.limelight.nvstream.av.video.VideoDecoderRenderer; import com.limelight.nvstream.http.ComputerDetails; -import com.limelight.nvstream.http.GfeHttpResponseException; +import com.limelight.nvstream.http.HostHttpResponseException; import com.limelight.nvstream.http.LimelightCryptoProvider; import com.limelight.nvstream.http.NvApp; import com.limelight.nvstream.http.NvHTTP; @@ -345,7 +344,7 @@ public class NvConnection { } else { return quitAndLaunch(h, context); } - } catch (GfeHttpResponseException e) { + } catch (HostHttpResponseException e) { if (e.getErrorCode() == 470) { // This is the error you get when you try to resume a session that's not yours. // Because this is fairly common, we'll display a more detailed message. @@ -378,7 +377,7 @@ public class NvConnection { context.connListener.displayMessage("Failed to quit previous session! You must quit it manually"); return false; } - } catch (GfeHttpResponseException e) { + } catch (HostHttpResponseException e) { if (e.getErrorCode() == 599) { context.connListener.displayMessage("This session wasn't started by this device," + " so it cannot be quit. End streaming on the original " + @@ -423,7 +422,7 @@ public class NvConnection { return; } context.connListener.stageComplete(appName); - } catch (GfeHttpResponseException e) { + } catch (HostHttpResponseException e) { e.printStackTrace(); context.connListener.displayMessage(e.getMessage()); context.connListener.stageFailed(appName, 0, e.getErrorCode()); diff --git a/app/src/main/java/com/limelight/nvstream/http/GfeHttpResponseException.java b/app/src/main/java/com/limelight/nvstream/http/HostHttpResponseException.java similarity index 68% rename from app/src/main/java/com/limelight/nvstream/http/GfeHttpResponseException.java rename to app/src/main/java/com/limelight/nvstream/http/HostHttpResponseException.java index df62bbf1..25a88334 100644 --- a/app/src/main/java/com/limelight/nvstream/http/GfeHttpResponseException.java +++ b/app/src/main/java/com/limelight/nvstream/http/HostHttpResponseException.java @@ -2,13 +2,13 @@ package com.limelight.nvstream.http; import java.io.IOException; -public class GfeHttpResponseException extends IOException { +public class HostHttpResponseException extends IOException { private static final long serialVersionUID = 1543508830807804222L; private int errorCode; private String errorMsg; - public GfeHttpResponseException(int errorCode, String errorMsg) { + public HostHttpResponseException(int errorCode, String errorMsg) { this.errorCode = errorCode; this.errorMsg = errorMsg; } @@ -23,6 +23,6 @@ public class GfeHttpResponseException extends IOException { @Override public String getMessage() { - return "GeForce Experience returned error: "+errorMsg+" (Error code: "+errorCode+")"; + return "Host PC returned error: "+errorMsg+" (Error code: "+errorCode+")"; } } 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 b28a72e6..4c2719d8 100644 --- a/app/src/main/java/com/limelight/nvstream/http/NvHTTP.java +++ b/app/src/main/java/com/limelight/nvstream/http/NvHTTP.java @@ -266,7 +266,7 @@ public class NvHTTP { return getXmlString(new StringReader(str), tagname, throwIfMissing); } - private static void verifyResponseStatus(XmlPullParser xpp) throws GfeHttpResponseException { + private static void verifyResponseStatus(XmlPullParser xpp) throws HostHttpResponseException { // We use Long.parseLong() because in rare cases GFE can send back a status code of // 0xFFFFFFFF, which will cause Integer.parseInt() to throw a NumberFormatException due // to exceeding Integer.MAX_VALUE. We'll get the desired error code of -1 by just casting @@ -280,7 +280,7 @@ public class NvHTTP { statusCode = 418; statusMsg = "Missing audio capture device. Reinstall GeForce Experience."; } - throw new GfeHttpResponseException(statusCode, statusMsg); + throw new HostHttpResponseException(statusCode, statusMsg); } } @@ -306,7 +306,7 @@ public class NvHTTP { if (e.getCause() instanceof CertificateException) { // Jump to the GfeHttpResponseException exception handler to retry // over HTTP which will allow us to pair again to update the cert - throw new GfeHttpResponseException(401, "Server certificate mismatch"); + throw new HostHttpResponseException(401, "Server certificate mismatch"); } else { throw e; @@ -317,7 +317,7 @@ public class NvHTTP { // We want this because it will throw us into the HTTP case if the client is unpaired. getServerVersion(resp); } - catch (GfeHttpResponseException e) { + catch (HostHttpResponseException e) { if (e.getErrorCode() == 401) { // Cert validation error - fall back to HTTP return openHttpConnectionToString(client, baseUrlHttp, "serverinfo"); @@ -435,7 +435,7 @@ public class NvHTTP { throw new FileNotFoundException(completeUrl.toString()); } else { - throw new GfeHttpResponseException(response.code(), response.message()); + throw new HostHttpResponseException(response.code(), response.message()); } } @@ -669,7 +669,7 @@ public class NvHTTP { return openHttpConnectionToString(httpClientLongConnectTimeout, getHttpsUrl(true), "applist"); } - public LinkedList getAppList() throws GfeHttpResponseException, IOException, XmlPullParserException { + public LinkedList getAppList() throws HostHttpResponseException, IOException, XmlPullParserException { if (verbose) { // Use the raw function so the app list is printed return getAppListByReader(new StringReader(getAppListRaw())); @@ -681,12 +681,12 @@ public class NvHTTP { } } - String executePairingCommand(String additionalArguments, boolean enableReadTimeout) throws GfeHttpResponseException, IOException { + String executePairingCommand(String additionalArguments, boolean enableReadTimeout) throws HostHttpResponseException, IOException { return openHttpConnectionToString(enableReadTimeout ? httpClientLongConnectTimeout : httpClientLongConnectNoReadTimeout, baseUrlHttp, "pair", "devicename=roth&updateState=1&" + additionalArguments); } - String executePairingChallenge() throws GfeHttpResponseException, IOException { + String executePairingChallenge() throws HostHttpResponseException, IOException { return openHttpConnectionToString(httpClientLongConnectTimeout, getHttpsUrl(true), "pair", "devicename=roth&updateState=1&phrase=pairchallenge"); } @@ -798,7 +798,7 @@ public class NvHTTP { if (getCurrentGame(getServerInfo(true)) != 0) { // Generate a synthetic GfeResponseException letting the caller know // that they can't kill someone else's stream. - throw new GfeHttpResponseException(599, ""); + throw new HostHttpResponseException(599, ""); } return true; diff --git a/app/src/main/java/com/limelight/utils/ServerHelper.java b/app/src/main/java/com/limelight/utils/ServerHelper.java index 9914e653..ef5a7902 100644 --- a/app/src/main/java/com/limelight/utils/ServerHelper.java +++ b/app/src/main/java/com/limelight/utils/ServerHelper.java @@ -6,13 +6,12 @@ import android.widget.Toast; import com.limelight.AppView; import com.limelight.Game; -import com.limelight.PcView; import com.limelight.R; import com.limelight.ShortcutTrampoline; import com.limelight.binding.PlatformBinding; import com.limelight.computers.ComputerManagerService; import com.limelight.nvstream.http.ComputerDetails; -import com.limelight.nvstream.http.GfeHttpResponseException; +import com.limelight.nvstream.http.HostHttpResponseException; import com.limelight.nvstream.http.NvApp; import com.limelight.nvstream.http.NvHTTP; import com.limelight.nvstream.jni.MoonBridge; @@ -135,7 +134,7 @@ public class ServerHelper { } else { message = parent.getResources().getString(R.string.applist_quit_fail) + " " + app.getAppName(); } - } catch (GfeHttpResponseException e) { + } catch (HostHttpResponseException e) { if (e.getErrorCode() == 599) { message = "This session wasn't started by this device," + " so it cannot be quit. End streaming on the original " + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 448a1837..6bc76c7a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -25,7 +25,7 @@ Testing Network Connection - Moonlight is testing your network connection to determine if NVIDIA GameStream is blocked.\n\nThis may take a few seconds… + Moonlight is testing your network connection to determine if any required ports are blocked.\n\nThis may take a few seconds… Network Test Complete Your network does not appear to be blocking Moonlight. If you still have trouble connecting, check your PC\'s firewall settings.\n\nIf you are trying to stream over the Internet, install the Moonlight Internet Hosting Tool on your PC and run the included Internet Streaming Tester to check your PC\'s Internet connection. 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. @@ -38,13 +38,14 @@ Computer is currently in a game. You must close the game before pairing. Pairing Please enter the following PIN on the target PC: + If your host PC is running Sunshine, navigate to the Sunshine web UI to enter the PIN. Incorrect PIN Pairing failed Pairing already in progress Computer is online - Unable to wake PC because GFE didn\'t send a MAC address + Unable to wake PC because there is no stored MAC address Waking PC… It may take a few seconds for your PC to wake up. If it doesn\'t, make sure it\'s configured properly for Wake-On-LAN. @@ -65,7 +66,7 @@ Using remote desktop software can also cause this error. Try rebooting your machine or reinstalling GFE. Video Decoder Crashed - Moonlight has crashed due to an incompatibility with this device\'s video decoder. Ensure GeForce Experience is updated to the latest version on your PC. Try adjusting the streaming settings if the crashes continue. + Moonlight has crashed due to an incompatibility with this device\'s video decoder. Try adjusting the streaming settings if the crashes continue. Video Settings Reset Your device\'s video decoder continues to crash at your selected streaming settings. Your streaming settings have been reset to default. USB access is prohibited by your device administrator. Check your Knox or MDM settings. @@ -73,7 +74,7 @@ Video decoder failed to initialize. Your device may not support the selected resolution or frame rate. No video received from host. Your network connection isn\'t performing well. Reduce your video bitrate setting or try a faster connection. - Something went wrong on your host PC when starting the stream.\n\nMake sure you don\'t have any DRM-protected content open on your host PC. You can also try restarting your host PC.\n\nIf the issue persists, try reinstalling your GPU drivers and GeForce Experience. + Something went wrong on your host PC when starting the stream.\n\nMake sure you don\'t have any DRM-protected content open on your host PC. You can also try restarting your host PC. The host PC reported a fatal video encoding error.\n\nTry disabling HDR mode, changing the streaming resolution, or changing your host PC\'s display resolution. Check your firewall and port forwarding rules for port(s): @@ -91,9 +92,9 @@ The connection was terminated - IP address of GeForce PC - Searching for PCs with GameStream running…\n\n - Ensure GameStream is enabled in the GeForce Experience SHIELD settings. + IP address of host PC + Searching for host PCs on your local network…\n\n + Ensure Sunshine is running on your host PC or GameStream is enabled in the GeForce Experience SHIELD settings. Yes No Lost connection to PC @@ -228,7 +229,7 @@ Change HEVC settings HEVC lowers video bandwidth requirements but requires a newer device Enable HDR (Experimental) - Stream HDR when the game and PC GPU support it. HDR requires a GTX 1000 series GPU or later. + Stream HDR when the game and PC GPU support it. HDR requires a GPU with HEVC Main 10 encoding support. Force full range video (Experimental) This will cause loss of detail in light and dark areas if your device doesn\'t properly display full range video content. Show performance stats while streaming