[Mobile-Dev] Fix alt-tab when fullscreen

This commit is contained in:
Anthony Calosa
2021-04-26 10:34:44 +08:00
parent bc61ec0495
commit e649c9128e

View File

@@ -101,8 +101,10 @@ public class Main {
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
config.setResizable(false);
config.setWindowedMode(desktopMode ? desktopScreenWidth : screenWidth, desktopMode ? desktopScreenHeight : screenHeight);
if (desktopMode && fullscreenFlag)
if (desktopMode && fullscreenFlag) {
config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
config.setAutoIconify(true); //fix alt-tab when running fullscreen
}
config.setTitle("Forge");
if (desktopMode)
config.setHdpiMode(HdpiMode.Logical);