fullscreenplayn

PlayN Fullscreen


I don't know why it is not working. I want to start my game in fullscreen on desktop (Java).

Code

@Override
public void setToFullScreen() {
    int screenHeight = graphics().screenHeight();
    int screenWidth = graphics().screenWidth();
    
    log().debug("ScreenHeight: " + screenHeight);
    log().debug("ScreenWidth: " + screenWidth);

    graphics().setSize(screenWidth, screenHeight);
}

The log says:

ScreenHeight: 480

ScreenWidth: 640

My possible resolution would be full hd - any ideas?


Solution

  • PlayN is not made for Java-fullscreen-mode.

    The Java-Applet view is made for debugging reasons for all other platforms.

    If you want to use fullscreen mode, you probably need to change the PlayN-java-sourcecode. You maybe have to use the method java.awt.GraphicsDevice.setFullScreenWindow(...)