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());
|
config.setMaximized(SPDSettings.windowMaximized());
|
||||||
|
|
||||||
//going fullscreen on launch is still buggy on macOS, so game enters it slightly later
|
//going fullscreen on launch is a bit buggy
|
||||||
if (SPDSettings.fullscreen() && !SharedLibraryLoader.isMac) {
|
// so game always starts windowed and then switches in DesktopPlatformSupport.updateSystemUI
|
||||||
config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
|
//config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
|
||||||
}
|
|
||||||
|
|
||||||
//records whether window is maximized or not for settings
|
//records whether window is maximized or not for settings
|
||||||
DesktopWindowListener listener = new DesktopWindowListener();
|
DesktopWindowListener listener = new DesktopWindowListener();
|
||||||
|
|||||||
@@ -45,16 +45,14 @@ public class DesktopPlatformSupport extends PlatformSupport {
|
|||||||
public void updateDisplaySize() {
|
public void updateDisplaySize() {
|
||||||
if (previousSizes == null){
|
if (previousSizes == null){
|
||||||
previousSizes = new Point[2];
|
previousSizes = new Point[2];
|
||||||
previousSizes[0] = previousSizes[1] = new Point(Game.width, Game.height);
|
previousSizes[1] = SPDSettings.windowResolution();
|
||||||
} else {
|
} else {
|
||||||
previousSizes[1] = previousSizes[0];
|
previousSizes[1] = previousSizes[0];
|
||||||
previousSizes[0] = new Point(Game.width, Game.height);
|
|
||||||
}
|
}
|
||||||
|
previousSizes[0] = new Point(Game.width, Game.height);
|
||||||
if (!SPDSettings.fullscreen()) {
|
if (!SPDSettings.fullscreen()) {
|
||||||
SPDSettings.windowResolution( previousSizes[0] );
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user