changeset 4999:55fccf89b340

Make sure we shut down the app if SDL_main() returns instead of exiting.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 13 Jan 2011 17:13:00 -0800
parents a514bfe6952a
children 6a10693e66c3
files src/main/android/SDL_android_main.cpp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/android/SDL_android_main.cpp	Thu Jan 13 15:10:17 2011 -0800
+++ b/src/main/android/SDL_android_main.cpp	Thu Jan 13 17:13:00 2011 -0800
@@ -23,8 +23,14 @@
     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: */