mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-07 16:36:10 +00:00
Now close Limelight when the stream is stopped if launched from command line
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -280,5 +280,8 @@ public class StreamFrame extends JFrame {
|
||||
public void close() {
|
||||
limelight.stop();
|
||||
dispose();
|
||||
if (Limelight.COMMAND_LINE_LAUNCH) {
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user