mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-17 14:00:21 +00:00
Merge branch 'master' of github.com:limelight-stream/limelight-pc
* 'master' of github.com:limelight-stream/limelight-pc: holding CTRL + ALT + SHIFT will now release the mouse. Also fixed mouse re-centering issue (i believe cannot test for sure on my system) Conflicts: limelight-pc/src/com/limelight/gui/StreamFrame.java
This commit is contained in:
@@ -28,12 +28,18 @@ import com.limelight.nvstream.NvConnectionListener.Stage;
|
|||||||
public class StreamFrame extends JFrame {
|
public class StreamFrame extends JFrame {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
private int centerX;
|
||||||
|
private int centerY;
|
||||||
|
>>>>>>> 89e07e63ef3e007caef9aec3334bfc2c75aafd1c
|
||||||
private KeyboardHandler keyboard;
|
private KeyboardHandler keyboard;
|
||||||
private MouseHandler mouse;
|
private MouseHandler mouse;
|
||||||
private JProgressBar spinner;
|
private JProgressBar spinner;
|
||||||
private JLabel spinnerLabel;
|
private JLabel spinnerLabel;
|
||||||
private Cursor noCursor;
|
private Cursor noCursor;
|
||||||
private NvConnection conn;
|
private NvConnection conn;
|
||||||
|
<<<<<<< HEAD
|
||||||
private static final int WIDTH = 1280;
|
private static final int WIDTH = 1280;
|
||||||
private static final int HEIGHT = 720;
|
private static final int HEIGHT = 720;
|
||||||
|
|
||||||
@@ -42,6 +48,21 @@ public class StreamFrame extends JFrame {
|
|||||||
showCursor();
|
showCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
public StreamFrame() {
|
||||||
|
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
|
||||||
|
this.setSize(1280,720);
|
||||||
|
centerX = dim.width/2-this.getSize().width/2;
|
||||||
|
centerY = dim.height/2-this.getSize().height/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void freeMouse() {
|
||||||
|
mouse.free();
|
||||||
|
showCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
>>>>>>> 89e07e63ef3e007caef9aec3334bfc2c75aafd1c
|
||||||
public void captureMouse() {
|
public void captureMouse() {
|
||||||
mouse.capture();
|
mouse.capture();
|
||||||
hideCursor();
|
hideCursor();
|
||||||
@@ -62,9 +83,13 @@ public class StreamFrame extends JFrame {
|
|||||||
this.setSize(WIDTH, HEIGHT);
|
this.setSize(WIDTH, HEIGHT);
|
||||||
|
|
||||||
this.setBackground(Color.BLACK);
|
this.setBackground(Color.BLACK);
|
||||||
|
<<<<<<< HEAD
|
||||||
this.getContentPane().setBackground(Color.BLACK);
|
this.getContentPane().setBackground(Color.BLACK);
|
||||||
this.getRootPane().setBackground(Color.BLACK);
|
this.getRootPane().setBackground(Color.BLACK);
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> 89e07e63ef3e007caef9aec3334bfc2c75aafd1c
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
makeFullScreen();
|
makeFullScreen();
|
||||||
}
|
}
|
||||||
@@ -104,7 +129,11 @@ public class StreamFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
public void hideCursor() {
|
public void hideCursor() {
|
||||||
|
=======
|
||||||
|
private void hideCursor() {
|
||||||
|
>>>>>>> 89e07e63ef3e007caef9aec3334bfc2c75aafd1c
|
||||||
if (noCursor == null) {
|
if (noCursor == null) {
|
||||||
// Transparent 16 x 16 pixel cursor image.
|
// Transparent 16 x 16 pixel cursor image.
|
||||||
BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
|
BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
|
||||||
@@ -116,9 +145,16 @@ public class StreamFrame extends JFrame {
|
|||||||
// Set the blank cursor to the JFrame.
|
// Set the blank cursor to the JFrame.
|
||||||
this.setCursor(noCursor);
|
this.setCursor(noCursor);
|
||||||
this.getContentPane().setCursor(noCursor);
|
this.getContentPane().setCursor(noCursor);
|
||||||
|
<<<<<<< HEAD
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showCursor() {
|
public void showCursor() {
|
||||||
|
=======
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showCursor() {
|
||||||
|
>>>>>>> 89e07e63ef3e007caef9aec3334bfc2c75aafd1c
|
||||||
this.setCursor(Cursor.getDefaultCursor());
|
this.setCursor(Cursor.getDefaultCursor());
|
||||||
this.getContentPane().setCursor(Cursor.getDefaultCursor());
|
this.getContentPane().setCursor(Cursor.getDefaultCursor());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user