v2.4.0: fixed various specific bugs caused by launching in fullscreen
This commit is contained in:
@@ -173,10 +173,9 @@ public class DesktopLauncher {
|
||||
|
||||
config.setMaximized(SPDSettings.windowMaximized());
|
||||
|
||||
//going fullscreen on launch is still buggy on macOS, so game enters it slightly later
|
||||
if (SPDSettings.fullscreen() && !SharedLibraryLoader.isMac) {
|
||||
config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
|
||||
}
|
||||
//going fullscreen on launch is a bit buggy
|
||||
// so game always starts windowed and then switches in DesktopPlatformSupport.updateSystemUI
|
||||
//config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
|
||||
|
||||
//records whether window is maximized or not for settings
|
||||
DesktopWindowListener listener = new DesktopWindowListener();
|
||||
|
||||
@@ -45,16 +45,14 @@ public class DesktopPlatformSupport extends PlatformSupport {
|
||||
public void updateDisplaySize() {
|
||||
if (previousSizes == null){
|
||||
previousSizes = new Point[2];
|
||||
previousSizes[0] = previousSizes[1] = new Point(Game.width, Game.height);
|
||||
previousSizes[1] = SPDSettings.windowResolution();
|
||||
} else {
|
||||
previousSizes[1] = previousSizes[0];
|
||||
previousSizes[0] = new Point(Game.width, Game.height);
|
||||
}
|
||||
previousSizes[0] = new Point(Game.width, Game.height);
|
||||
if (!SPDSettings.fullscreen()) {
|
||||
SPDSettings.windowResolution( previousSizes[0] );
|
||||
}
|
||||
//TODO fixes an in libGDX v1.11.0 with macOS displays
|
||||
Gdx.gl.glViewport(0, 0, Gdx.graphics.getBackBufferWidth(), Gdx.graphics.getBackBufferHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user