From 49b4a073b2354598fc505ffbdf638cbac69b5688 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 4 Sep 2022 22:54:51 +0600 Subject: установка настроек экрана MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/com/ilotterytea/maxoning/MaxonGame.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/src/com/ilotterytea') 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)); -- cgit v1.2.3