2 #include <msp/fs/path.h>
3 #include "application.h"
4 #include "errorlogger.h"
5 #include "mainthread.h"
12 MainThread::MainThread(ANativeActivity *a):
18 void MainThread::main()
20 /* I have no idea how dependable this is, but it seems to be the only way
21 to get the package name aside from making a Java call through JNI */
22 char *appname = strdup(FS::Path(activity->internalDataPath)[-2].c_str());
23 char *argv[] = { appname, 0 };
24 Msp::Android::ErrorLogger err_logger;
25 Msp::Application::run(1, argv, activity);
27 ANativeActivity_finish(activity);
30 } // namespace Android