Commit 0ce43244 authored by Sam Lantinga's avatar Sam Lantinga

Make sure we shut down the app if SDL_main() returns instead of exiting.

parent 9fa1d487
......@@ -23,8 +23,14 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass c
SDL_Android_Init(env, cls);
/* Run the application code! */
int status;
char *argv[2];
argv[0] = strdup("SDL_app");
argv[1] = NULL;
SDL_main(1, argv);
status = SDL_main(1, argv);
/* We exit here for consistency with other platforms. */
exit(status);
}
/* vi: set ts=4 sw=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment