Get rid of the exit(0) at the end of android_main() function

After NDK r22 it longer crashes after dlclose, see:
https://github.com/android/ndk/issues/1200

Fix #3000
This commit is contained in:
Benau 2021-10-04 20:10:41 +08:00
parent 75db65d43a
commit 3d575a50a7

View File

@ -94,15 +94,7 @@ extern "C" int SDL_main(int argc, char *argv[])
{
registering_natives();
override_default_params_for_mobile();
int result = android_main(argc, argv);
// TODO: Irrlicht device is properly waiting for destroy event, but
// some global variables are not initialized/cleared in functions and thus
// its state is remembered when the window is restored. We will use exit
// call to make sure that all variables are cleared until a proper fix will
// be done.
fflush(NULL);
_exit(0);
return 0;
return android_main(argc, argv);
}
#endif