mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-16 07:10:08 +00:00
54 lines
1.3 KiB
C
54 lines
1.3 KiB
C
|
/*
|
||
|
SDL_android_main.c, placed in the public domain by Sam Lantinga 3/13/14
|
||
|
*/
|
||
|
#include "../../SDL_internal.h"
|
||
|
|
||
|
#ifdef __ANDROID__
|
||
|
|
||
|
/* Include the SDL main definition header */
|
||
|
#include "SDL_main.h"
|
||
|
|
||
|
|
||
|
/*******************************************************************************
|
||
|
Functions called by JNI
|
||
|
*******************************************************************************/
|
||
|
#include <jni.h>
|
||
|
|
||
|
/* Called before SDL_main() to initialize JNI bindings in SDL library */
|
||
|
|
||
|
|
||
|
//extern void SDL_Android_Init(JNIEnv* env, jclass cls);
|
||
|
|
||
|
extern void SDL_Android_Init(JNIEnv* env, jclass cls);
|
||
|
|
||
|
/* Start up the SDL app */
|
||
|
int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj)
|
||
|
{
|
||
|
/* This interface could expand with ABI negotiation, calbacks, etc. */
|
||
|
SDL_Android_Init(env, cls);
|
||
|
|
||
|
SDL_SetMainReady();
|
||
|
|
||
|
//DL_SetHint(SDL_HINT_RENDER_DRIVER, "software");
|
||
|
|
||
|
// SDL_SetHint(SDL_HINT_SIMULATE_INPUT_EVENTS, "0");
|
||
|
|
||
|
|
||
|
/* Run the application code! */
|
||
|
|
||
|
int status;
|
||
|
char *argv[2];
|
||
|
argv[0] = SDL_strdup("openmw");
|
||
|
argv[1] = NULL;
|
||
|
status = main(1, argv);
|
||
|
|
||
|
/* Do not issue an exit or the whole application will terminate instead of just the SDL thread */
|
||
|
/* exit(status); */
|
||
|
|
||
|
return status;
|
||
|
}
|
||
|
|
||
|
#endif /* __ANDROID__ */
|
||
|
|
||
|
/* vi: set ts=4 sw=4 expandtab: */
|