diff --git a/apps/openmw/android_main.c b/apps/openmw/android_main.c index 132e8ecf8..3f28afa1b 100644 --- a/apps/openmw/android_main.c +++ b/apps/openmw/android_main.c @@ -2,6 +2,8 @@ int stderr = 0; // Hack: fix linker error #include "SDL_main.h" #include +#include +#include /******************************************************************************* Functions called by JNI @@ -15,6 +17,25 @@ extern int argcData; extern const char **argvData; void releaseArgv(); + +int Java_org_libsdl_app_SDLActivity_getMouseX(JNIEnv *env, jclass cls, jobject obj) { + int ret = 0; + SDL_GetMouseState(&ret, NULL); + return ret; +} + + +int Java_org_libsdl_app_SDLActivity_getMouseY(JNIEnv *env, jclass cls, jobject obj) { + int ret = 0; + SDL_GetMouseState(NULL, &ret); + return ret; +} + +int Java_org_libsdl_app_SDLActivity_isMouseShown(JNIEnv *env, jclass cls, jobject obj) { + return SDL_ShowCursor(SDL_QUERY); +} + + int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj) {