summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-09 23:27:54 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-09 23:27:54 +0100
commitfd124f484050ae6ba75554e7398650b62b90b314 (patch)
treebdc456d37afa6bbeae2463503ae9d71cce359e61 /core
parent32daf8c19f359a98bcb41019bd891e4c33b59654 (diff)
downloadRustAndDust-fd124f484050ae6ba75554e7398650b62b90b314.zip
RustAndDust-fd124f484050ae6ba75554e7398650b62b90b314.tar.gz
load config at startup, unload it at options modifications
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/RustAndDust.java1
-rw-r--r--core/src/ch/asynk/rustanddust/menu/OptionsMenu.java1
2 files changed, 2 insertions, 0 deletions
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;
}