Make sure we shut down the app if SDL_main() returns instead of exiting.
authorSam Lantinga <slouken@libsdl.org>
Thu, 13 Jan 2011 17:13:00 -0800
changeset 4999 55fccf89b340
parent 4998 a514bfe6952a
child 5000 6a10693e66c3
Make sure we shut down the app if SDL_main() returns instead of exiting.
src/main/android/SDL_android_main.cpp
--- 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: */