summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-22 15:28:09 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-22 15:28:09 +0100
commit32c00ef88c43cb65a1b32b4d22eefa679ba3865d (patch)
tree7f529770d9fc83c40459fd75a6205a8849002fca /core/src/ch
parent925a967f1316195af52f09f5f6dc29ed9c1a6ed1 (diff)
downloadRustAndDust-32c00ef88c43cb65a1b32b4d22eefa679ba3865d.zip
RustAndDust-32c00ef88c43cb65a1b32b4d22eefa679ba3865d.tar.gz
RustAndDust: fix db file path
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/rustanddust/RustAndDust.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/RustAndDust.java b/core/src/ch/asynk/rustanddust/RustAndDust.java
index d11f828..759f72c 100644
--- a/core/src/ch/asynk/rustanddust/RustAndDust.java
+++ b/core/src/ch/asynk/rustanddust/RustAndDust.java
@@ -62,7 +62,7 @@ public class RustAndDust extends Game
public static final String DOM = "RustAndDust";
- public static final String DB_FILE = "data/rustanddust.sqlite";
+ public static final String DB_FILE = "rustanddust.sqlite";
public AssetManager manager;
public Factory factory;
@@ -112,6 +112,15 @@ public class RustAndDust extends Game
return uiAtlas.findRegion(s);
}
+ private String dbFile()
+ {
+ switch (Gdx.app.getType()) {
+ case Desktop:
+ return String.format("data/%s", DB_FILE);
+ }
+ return DB_FILE;
+ }
+
@Override
public void create ()
{
@@ -119,7 +128,7 @@ public class RustAndDust extends Game
this.hudCorrection = ((int) (125 * Gdx.graphics.getDensity()) - 75);
debug("create() [" + Gdx.graphics.getWidth() + ";" + Gdx.graphics.getHeight() + "] " + Gdx.graphics.getDensity() + " -> " + hudCorrection);
- db = new DB(Gdx.files.internal(DB_FILE).path(), true);
+ db = new DB(Gdx.files.internal(dbFile()).path(), true);
db.setup();
manager = new AssetManager();