Make sure we shut down the app if SDL_main() returns instead of exiting.
This commit is contained in:
parent
9fa1d4876d
commit
0ce4324420
1 changed files with 7 additions and 1 deletions
|
@ -23,8 +23,14 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass c
|
||||||
SDL_Android_Init(env, cls);
|
SDL_Android_Init(env, cls);
|
||||||
|
|
||||||
/* Run the application code! */
|
/* Run the application code! */
|
||||||
|
int status;
|
||||||
char *argv[2];
|
char *argv[2];
|
||||||
argv[0] = strdup("SDL_app");
|
argv[0] = strdup("SDL_app");
|
||||||
argv[1] = NULL;
|
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: */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue