summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-31 23:43:28 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-31 23:43:28 +0300
commit87e8f99916b8537e2a9bbe7ef80e8c6a250afb90 (patch)
treeee46454c7ebbee87eab599b1091fd88ba825e35f /src/main.cpp
parentc60449fa25d76bd30668ae0de870d3897372b09b (diff)
downloadmv-87e8f99916b8537e2a9bbe7ef80e8c6a250afb90.tar.gz
mv-87e8f99916b8537e2a9bbe7ef80e8c6a250afb90.tar.bz2
mv-87e8f99916b8537e2a9bbe7ef80e8c6a250afb90.tar.xz
mv-87e8f99916b8537e2a9bbe7ef80e8c6a250afb90.zip
Fix base directory issue under Android.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b7f721626..ea9ddb8a3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -241,7 +241,11 @@ int main(int argc, char *argv[])
}
// Initialize PhysicsFS
+#ifdef ANDROID
+ if (!PHYSFS_init((getRealPath(".") + "/fakebinary").c_str()))
+#else
if (!PHYSFS_init(argv[0]))
+#endif
{
std::cout << "Error while initializing PhysFS: "
<< PHYSFS_getLastError() << std::endl;