diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-18 04:24:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-11-18 04:24:33 +0300 |
commit | 868514ac621b3ca5c0a9f924461e37164dc712ff (patch) | |
tree | 60ef7bb390d4cca25081c7d6eeb809da2193aee3 /src/main.cpp | |
parent | db00f34d1c385c8ec007a077c2f78aef764d3bbb (diff) | |
download | manaverse-868514ac621b3ca5c0a9f924461e37164dc712ff.tar.gz manaverse-868514ac621b3ca5c0a9f924461e37164dc712ff.tar.bz2 manaverse-868514ac621b3ca5c0a9f924461e37164dc712ff.tar.xz manaverse-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.cpp | 5 |
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])) |