summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2022-09-04 22:54:51 +0600
committerilotterytea <iltsu@alright.party>2022-09-04 22:54:51 +0600
commit49b4a073b2354598fc505ffbdf638cbac69b5688 (patch)
treed378c9f076446697375416618438028fe8263912 /core
parenta45c8fa579fdf0d2be48c02428b792309808f242 (diff)
установка настроек экрана
Diffstat (limited to 'core')
-rw-r--r--core/src/com/ilotterytea/maxoning/MaxonGame.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/src/com/ilotterytea/maxoning/MaxonGame.java b/core/src/com/ilotterytea/maxoning/MaxonGame.java
index 5c9af2b..4ee3861 100644
--- a/core/src/com/ilotterytea/maxoning/MaxonGame.java
+++ b/core/src/com/ilotterytea/maxoning/MaxonGame.java
@@ -44,6 +44,13 @@ public class MaxonGame extends Game {
}
}
+ prefs.putInteger("width", Gdx.graphics.getWidth());
+ prefs.putInteger("height", Gdx.graphics.getHeight());
+ prefs.flush();
+
+ Gdx.graphics.setVSync(prefs.getBoolean("vsync", true));
+ if (prefs.getBoolean("fullscreen", false)) { Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); }
+
assetManager = new AssetManager();
this.setScreen(new AssetLoadingScreen(this));