mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-23 16:46:48 +00:00
now only fixes menu stuff on osx so it doesn't break on other oses
This commit is contained in:
@@ -17,7 +17,7 @@ import com.limelight.nvstream.av.video.VideoDecoderRenderer;
|
|||||||
|
|
||||||
public class Limelight implements NvConnectionListener {
|
public class Limelight implements NvConnectionListener {
|
||||||
public static final double VERSION = 1.0;
|
public static final double VERSION = 1.0;
|
||||||
|
|
||||||
private String host;
|
private String host;
|
||||||
private StreamFrame streamFrame;
|
private StreamFrame streamFrame;
|
||||||
private NvConnection conn;
|
private NvConnection conn;
|
||||||
@@ -42,22 +42,24 @@ public class Limelight implements NvConnectionListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
// take the menu bar off the jframe
|
//fix the menu bar if we are running in osx
|
||||||
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
if (System.getProperty("os.name").contains("Mac OS X")) {
|
||||||
|
// take the menu bar off the jframe
|
||||||
|
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
||||||
|
|
||||||
// set the name of the application menu item
|
// set the name of the application menu item
|
||||||
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Limelight");
|
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Limelight");
|
||||||
|
|
||||||
|
// set the look and feel
|
||||||
|
try {
|
||||||
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("OH Shit...");
|
||||||
|
e.printStackTrace();
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// set the look and feel
|
|
||||||
try {
|
|
||||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println("OH Shit...");
|
|
||||||
e.printStackTrace();
|
|
||||||
System.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
MainFrame limeFrame = new MainFrame();
|
MainFrame limeFrame = new MainFrame();
|
||||||
limeFrame.build();
|
limeFrame.build();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user