v1.2.0: fixed fullscreen on launch issues on macOS

This commit is contained in:
Evan Debenham 2022-02-06 13:16:27 -05:00
parent 06b72e7e5f
commit 1335bfbc76

View File

@ -163,11 +163,12 @@ public class DesktopLauncher {
config.setMaximized(SPDSettings.windowMaximized());
if (SPDSettings.fullscreen()) {
//going fullscreen on launch is still buggy on macOS, so game enters it slightly later
if (SPDSettings.fullscreen() && !SharedLibraryLoader.isMac) {
config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
}
//we set fullscreen/maximized in the listener as doing it through the config seems to be buggy
//records whether window is maximized or not for settings
DesktopWindowListener listener = new DesktopWindowListener();
config.setWindowListener( listener );