* More Android patch work

main
Joseba Garc?a Etxebarria 2015-03-24 21:02:28 +01:00
parent 387fa5dcfb
commit ca7b18e43f
4 changed files with 7 additions and 16 deletions

View File

@ -950,7 +950,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
if(Build.VERSION.SDK_INT >= 12) {
setOnGenericMotionListener(new SDLGenericMotionListener_API12());
setOnGenericMotionListener(new SDLGenericMotionListener());
}
// Some arbitrary defaults to avoid a potential division by zero

View File

@ -302,14 +302,6 @@ JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_onNativeMouse(
Android_OnMouse(button, action, x, y);
}
/* Mouse */
JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_onNativeMouse(
JNIEnv* env, jclass jcls,
jint button, jint action, jfloat x, jfloat y)
{
Android_OnMouse(button, action, x, y);
}
/* Accelerometer */
JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_onNativeAccel(
JNIEnv* env, jclass jcls,

View File

@ -24,7 +24,7 @@
#if SDL_VIDEO_DRIVER_ANDROID
#include "SDL_androidmouse.h"
#include "SDL_Log.h"
#include "SDL_log.h"
#include "SDL_events.h"
#include "../../events/SDL_mouse_c.h"
@ -71,7 +71,7 @@ void Android_OnMouse( int androidButton, int action, float x, float y) {
break;
case ACTION_SCROLL:
SDL_SendMouseWheel(Android_Window, 0, x, y);
SDL_SendMouseWheel(Android_Window, 0, x, y, SDL_MOUSEWHEEL_NORMAL);
break;
default:

View File

@ -24,13 +24,12 @@
#include <android/log.h>
#include "SDL_hints.h"
#include "SDL_events.h"
#include "SDL_log.h"
#include "SDL_androidtouch.h"
#include "../../events/SDL_mouse_c.h"
#include "../../events/SDL_touch_c.h"
#include "SDL_log.h"
#include "SDL_androidtouch.h"
#include "../../core/android/SDL_android.h"
#define ACTION_DOWN 0
@ -69,7 +68,7 @@ void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int actio
SDL_TouchID touchDeviceId = 0;
SDL_FingerID fingerId = 0;
int window_x, window_y;
char * hint;
const char * hint;
static SDL_FingerID pointerFingerID = 0;
if (!Android_Window) {