mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-15 21:31:12 +00:00
Now close Limelight when the stream is stopped if launched from command line
This commit is contained in:
@@ -27,6 +27,7 @@ import com.limelight.settings.PreferencesManager.Preferences.Resolution;
|
|||||||
*/
|
*/
|
||||||
public class Limelight implements NvConnectionListener {
|
public class Limelight implements NvConnectionListener {
|
||||||
public static final double VERSION = 1.0;
|
public static final double VERSION = 1.0;
|
||||||
|
public static boolean COMMAND_LINE_LAUNCH = false;
|
||||||
|
|
||||||
private String host;
|
private String host;
|
||||||
private StreamFrame streamFrame;
|
private StreamFrame streamFrame;
|
||||||
@@ -189,6 +190,7 @@ public class Limelight implements NvConnectionListener {
|
|||||||
|
|
||||||
Limelight limelight = new Limelight(host);
|
Limelight limelight = new Limelight(host);
|
||||||
limelight.startUp(streamConfig, fullscreen);
|
limelight.startUp(streamConfig, fullscreen);
|
||||||
|
COMMAND_LINE_LAUNCH = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -280,5 +280,8 @@ public class StreamFrame extends JFrame {
|
|||||||
public void close() {
|
public void close() {
|
||||||
limelight.stop();
|
limelight.stop();
|
||||||
dispose();
|
dispose();
|
||||||
|
if (Limelight.COMMAND_LINE_LAUNCH) {
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user