summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-18 04:24:33 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-18 04:24:33 +0300
commit868514ac621b3ca5c0a9f924461e37164dc712ff (patch)
tree60ef7bb390d4cca25081c7d6eeb809da2193aee3 /src/main.cpp
parentdb00f34d1c385c8ec007a077c2f78aef764d3bbb (diff)
downloadmanaplus-868514ac621b3ca5c0a9f924461e37164dc712ff.tar.gz
manaplus-868514ac621b3ca5c0a9f924461e37164dc712ff.tar.bz2
manaplus-868514ac621b3ca5c0a9f924461e37164dc712ff.tar.xz
manaplus-868514ac621b3ca5c0a9f924461e37164dc712ff.zip
Add support for persistent directory under Android.
This directory used for updates, configs, logs.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ea9ddb8a3..baa356386 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -30,6 +30,9 @@
#include <physfs.h>
#include "utils/gettext.h"
+#ifdef ANDROID
+#include "utils/mkdir.h"
+#endif
#include "utils/paths.h"
#include "utils/xml.h"
@@ -242,6 +245,8 @@ int main(int argc, char *argv[])
// Initialize PhysicsFS
#ifdef ANDROID
+ mkdir_r(getenv("DATADIR2"));
+
if (!PHYSFS_init((getRealPath(".") + "/fakebinary").c_str()))
#else
if (!PHYSFS_init(argv[0]))