Removed Xpreria Play touchpad code

This commit is contained in:
pelya
2013-11-03 16:19:47 +02:00
parent 994456b228
commit df6afa23aa
3 changed files with 18 additions and 37 deletions

View File

@@ -834,7 +834,6 @@ class DemoGLSurfaceView extends GLSurfaceView_SDL {
public static native void nativeMotionEvent( int x, int y, int action, int pointerId, int pressure, int radius );
public static native int nativeKey( int keyCode, int down );
public static native void nativeTouchpad( int x, int y, int down, int multitouch );
public static native void initJavaCallbacks();
public static native void nativeHardwareMouseDetected( int detected );
public static native void nativeMouseButtonsPressed( int buttonId, int pressedState );

View File

@@ -0,0 +1,18 @@
You will to install some packages to your Debian/Ubuntu first:
sudo apt-get install libpixman-1-dev libxfont-dev \
libxkbfile-dev libpciaccess-dev xutils-dev xcb-proto \
python-xcbgen xsltproc x11proto-bigreqs-dev \
x11proto-composite-dev x11proto-core-dev \
x11proto-damage-dev x11proto-dmx-dev \
x11proto-dri2-dev x11proto-fixes-dev \
x11proto-fonts-dev x11proto-gl-dev \
x11proto-input-dev x11proto-kb-dev \
x11proto-print-dev x11proto-randr-dev \
x11proto-record-dev x11proto-render-dev \
x11proto-resource-dev x11proto-scrnsaver-dev \
x11proto-video-dev x11proto-xcmisc-dev \
x11proto-xext-dev x11proto-xf86bigfont-dev \
x11proto-xf86dga-dev x11proto-xf86dri-dev \
x11proto-xf86vidmode-dev x11proto-xinerama-dev

View File

@@ -692,42 +692,6 @@ void ProcessDeferredMouseTap()
}
}
JNIEXPORT void JNICALL
JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeTouchpad) ( JNIEnv* env, jobject thiz, jint x, jint y, jint down, jint multitouch)
{
if( !SDL_ANDROID_isMouseUsed )
return;
if( ! down )
{
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_RIGHT );
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_LEFT );
SDL_ANDROID_moveMouseWithKbX = -1;
SDL_ANDROID_moveMouseWithKbY = -1;
SDL_ANDROID_moveMouseWithKbAccelUpdateNeeded = 0;
}
else
{
// x and y from 0 to 65535
if( SDL_ANDROID_moveMouseWithKbX < 0 )
{
SDL_ANDROID_moveMouseWithKbX = SDL_ANDROID_currentMouseX;
SDL_ANDROID_moveMouseWithKbY = SDL_ANDROID_currentMouseY;
}
SDL_ANDROID_moveMouseWithKbSpeedX = (x - 32767) / 8192;
SDL_ANDROID_moveMouseWithKbSpeedY = (y - 32767) / 8192;
//moveMouseWithKbX += moveMouseWithKbSpeedX;
//moveMouseWithKbY += moveMouseWithKbSpeedY;
SDL_ANDROID_MainThreadPushMouseMotion(SDL_ANDROID_moveMouseWithKbX, SDL_ANDROID_moveMouseWithKbY);
SDL_ANDROID_moveMouseWithKbAccelUpdateNeeded = 1;
if( multitouch )
SDL_ANDROID_MainThreadPushMouseButton( SDL_PRESSED, SDL_BUTTON_RIGHT );
else
if( abs(x - 32767) < 8192 && abs(y - 32767) < 8192 )
SDL_ANDROID_MainThreadPushMouseButton( SDL_PRESSED, SDL_BUTTON_LEFT );
}
}
void SDL_ANDROID_WarpMouse(int x, int y)
{
if(!relativeMovement)