From fd124f484050ae6ba75554e7398650b62b90b314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 9 Feb 2016 23:27:54 +0100 Subject: load config at startup, unload it at options modifications --- core/src/ch/asynk/rustanddust/RustAndDust.java | 1 + core/src/ch/asynk/rustanddust/menu/OptionsMenu.java | 1 + 2 files changed, 2 insertions(+) diff --git a/core/src/ch/asynk/rustanddust/RustAndDust.java b/core/src/ch/asynk/rustanddust/RustAndDust.java index a02974b..c558c6f 100644 --- a/core/src/ch/asynk/rustanddust/RustAndDust.java +++ b/core/src/ch/asynk/rustanddust/RustAndDust.java @@ -121,6 +121,7 @@ public class RustAndDust extends Game factory = new Factory(this); config = new Config(); backend.init(this); + config.load(db.loadConfig()); state = State.NONE; loadUiAssets(); diff --git a/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java b/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java index f5b5182..b947203 100644 --- a/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java +++ b/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java @@ -95,6 +95,7 @@ public class OptionsMenu extends Patch game.config.debug = checkValues[0]; game.config.fxVolume = (fxVolumeIdx / 10.0f); game.config.graphics = game.config.graphics.get(graphicsIdx); + game.db.storeConfig(game.config.unload()); return true; } -- cgit v1.1-2-g2b99