Revert JNI calls passed through SDL_main()

This commit is contained in:
Garen J. Torikian
2011-09-01 21:43:25 -07:00
parent 136d307c1b
commit ba5ec36dfd
2 changed files with 0 additions and 29 deletions

View File

@@ -24,9 +24,6 @@
#define _SDL_main_h
#include "SDL_stdinc.h"
#ifdef RELEASE_BUILD
#include <jni.h>
#endif
/** @file SDL_main.h
* Redefine main() on Win32 and MacOS so that it is called by winmain.c
@@ -57,11 +54,7 @@
#define main SDL_main
/** The prototype for the application's main() function */
#ifdef RELEASE_BUILD
extern C_LINKAGE int SDL_main(int argc, char *argv[], JNIEnv* env, jobject thiz);
#else
extern C_LINKAGE int SDL_main(int argc, char *argv[]);
#endif
/** @name From the SDL library code -- needed for registering the app on Win32 */
/*@{*/

View File

@@ -28,11 +28,6 @@
static int argc = 0;
static char ** argv = NULL;
#ifdef RELEASE_BUILD
static JNIEnv* static_env;
static jobject static_thiz;
#endif
#if SDL_VERSION_ATLEAST(1,3,0)
#else
extern void SDL_ANDROID_MultiThreadedVideoLoopInit();
@@ -40,11 +35,7 @@ extern void SDL_ANDROID_MultiThreadedVideoLoop();
static int threadedMain(void * unused)
{
#ifdef RELEASE_BUILD
SDL_main( argc, argv, static_env, static_thiz );
#else
SDL_main( argc, argv );
#endif
__android_log_print(ANDROID_LOG_INFO, "libSDL", "Application closed, calling exit(0)");
exit(0);
}
@@ -58,11 +49,6 @@ JAVA_EXPORT_NAME(DemoRenderer_nativeInit) ( JNIEnv* env, jobject thiz, jstring
const jbyte *jstr;
const char * str = "sdl";
#ifdef RELEASE_BUILD
static_env = env;
static_thiz = thiz;
#endif
strcpy(curdir, "/sdcard/app-data/");
strcat(curdir, SDL_CURDIR_PATH);
@@ -116,18 +102,10 @@ JAVA_EXPORT_NAME(DemoRenderer_nativeInit) ( JNIEnv* env, jobject thiz, jstring
__android_log_print(ANDROID_LOG_INFO, "libSDL", "param %d = \"%s\"", i, argv[i]);
#if SDL_VERSION_ATLEAST(1,3,0)
#ifdef RELEASE_BUILD
SDL_main( argc, argv, env, thiz );
#else
SDL_main( argc, argv );
#endif
#else
if( ! multiThreadedVideo )
#ifdef RELEASE_BUILD
SDL_main( argc, argv, env, thiz );
#else
SDL_main( argc, argv );
#endif
else
{
SDL_ANDROID_MultiThreadedVideoLoopInit();