You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/android_main.c

38 lines
869 B
C

11 years ago
#ifdef __ANDROID__
#include "SDL_main.h"
/*******************************************************************************
Functions called by JNI
*******************************************************************************/
11 years ago
#include <jni.h>
11 years ago
/* Called before to initialize JNI bindings */
11 years ago
extern void SDL_Android_Init(JNIEnv* env, jclass cls);
extern int argcData;
extern const char **argvData;
void releaseArgv();
int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls,
jobject obj) {
SDL_Android_Init(env, cls);
SDL_SetMainReady();
11 years ago
/* Run the application code! */
11 years ago
int status;
11 years ago
status = main(argcData+1, argvData);
releaseArgv();
/* Do not issue an exit or the whole application will terminate instead of just the SDL thread */
/* exit(status); */
11 years ago
return status;
11 years ago
}
#endif /* __ANDROID__ */