X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fandroid%2Fmainthread.cpp;h=473379bd71ce373c4e8e8829d4a00ece43ff3c57;hp=7219cdf2fdd9ef1476072f90aac28a1364beb776;hb=fa82e97ed56597f2d968abdf4ebf688de4f9b618;hpb=e2b5cb6cd61bf8c6f56f624cc835233df92288da diff --git a/source/core/android/mainthread.cpp b/source/core/android/mainthread.cpp index 7219cdf..473379b 100644 --- a/source/core/android/mainthread.cpp +++ b/source/core/android/mainthread.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include "application.h" #include "errorlogger.h" #include "mainthread.h" @@ -49,9 +51,10 @@ void MainThread::main() { /* I have no idea how dependable this is, but it seems to be the only way to get the package name aside from making a Java call through JNI */ - char *appname = strdup(FS::Path(activity->internalDataPath)[-2].c_str()); + char *appname = strdup(int_data_path[-2].c_str()); char *argv[] = { appname, 0 }; Msp::Android::ErrorLogger err_logger; + FS::chdir(FS::dirname(int_data_path)); Msp::Application::run(1, argv, this, &app_created); free(appname); if(activity)