Turned full screen mode on the rasp off
This commit is contained in:
+15
-15
@@ -36,21 +36,21 @@ public class Window extends JFrame {
|
|||||||
setSize(WIDTH, HEIGHT);
|
setSize(WIDTH, HEIGHT);
|
||||||
|
|
||||||
//Create Events
|
//Create Events
|
||||||
Window.ON_RASP = ON_RASP;
|
// Window.ON_RASP = ON_RASP;
|
||||||
if(ON_RASP){ //Only on the raspberry pi
|
// if(ON_RASP){ //Only on the raspberry pi
|
||||||
GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
// GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||||
GraphicsDevice[] devices = graphicsEnvironment.getScreenDevices();
|
// GraphicsDevice[] devices = graphicsEnvironment.getScreenDevices();
|
||||||
|
//
|
||||||
if (!devices[0].isFullScreenSupported ()){
|
// if (!devices[0].isFullScreenSupported ()){
|
||||||
throw new UnsupportedOperationException ("Fullscreen mode is unsupported.");
|
// throw new UnsupportedOperationException ("Fullscreen mode is unsupported.");
|
||||||
}else{
|
// }else{
|
||||||
devices[0].setFullScreenWindow(this);
|
// devices[0].setFullScreenWindow(this);
|
||||||
}
|
// }
|
||||||
//Remove cursor
|
// //Remove cursor
|
||||||
BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
|
// BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
|
||||||
Cursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), "blank cursor");
|
// Cursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), "blank cursor");
|
||||||
this.setCursor(blankCursor);
|
// this.setCursor(blankCursor);
|
||||||
}
|
// }
|
||||||
|
|
||||||
ButtonHandler bth = new ButtonHandler();
|
ButtonHandler bth = new ButtonHandler();
|
||||||
JoystickHandler jsh = new JoystickHandler();
|
JoystickHandler jsh = new JoystickHandler();
|
||||||
|
|||||||
Reference in New Issue
Block a user