Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Make sure we shut down the app if SDL_main() returns instead of exiting.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 14, 2011
1 parent 221b349 commit 052a226
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/android/SDL_android_main.cpp
Expand Up @@ -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: */

0 comments on commit 052a226

Please sign in to comment.