Now close Limelight when the stream is stopped if launched from command line

This commit is contained in:
Diego Waxemberg
2014-01-01 11:02:36 -05:00
parent 38f83b6c52
commit 00b54a201c
2 changed files with 6 additions and 1 deletions

View File

@@ -27,7 +27,8 @@ import com.limelight.settings.PreferencesManager.Preferences.Resolution;
*/
public class Limelight implements NvConnectionListener {
public static final double VERSION = 1.0;
public static boolean COMMAND_LINE_LAUNCH = false;
private String host;
private StreamFrame streamFrame;
private NvConnection conn;
@@ -189,6 +190,7 @@ public class Limelight implements NvConnectionListener {
Limelight limelight = new Limelight(host);
limelight.startUp(streamConfig, fullscreen);
COMMAND_LINE_LAUNCH = true;
}

View File

@@ -280,5 +280,8 @@ public class StreamFrame extends JFrame {
public void close() {
limelight.stop();
dispose();
if (Limelight.COMMAND_LINE_LAUNCH) {
System.exit(0);
}
}
}