Different cwd for android

This commit is contained in:
Jari Vetoniemi 2020-03-11 23:06:57 +09:00
parent 9dc42914de
commit 3d02e533eb

View file

@ -220,6 +220,14 @@ int main(int argc, char *argv[])
}
#endif
#ifdef __ANDROID__
const char *android_path = SDL_AndroidGetInternalStoragePath();
if (!android_path || chdir(android_path) != 0) {
showInitError(std::string("Unable to switch into ") + std::string((android_path ? android_path : "NULL")));
return 0;
}
#endif
/* now we load the config */
Config conf;
conf.read(argc, argv);