Now uses touchcontrols for all input, no SDL
This commit is contained in:
parent
c9c7c268d0
commit
de3442951d
37 changed files with 4366 additions and 4361 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 215d7a35d99850dcbc38d37fb8fe9b4166fefcf3
|
Subproject commit f93ba2ac968bb2bf1d82f87e78eaba77d9fe05b8
|
|
@ -1175,7 +1175,13 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||||
// Touch events
|
// Touch events
|
||||||
@Override
|
@Override
|
||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
|
||||||
|
|
||||||
|
SDLActivity.controlInterp.onTouchEvent(event);
|
||||||
|
return true;
|
||||||
|
|
||||||
/* Ref: http://developer.android.com/training/gestures/multi.html */
|
/* Ref: http://developer.android.com/training/gestures/multi.html */
|
||||||
|
/*
|
||||||
final int touchDevId = event.getDeviceId();
|
final int touchDevId = event.getDeviceId();
|
||||||
final int pointerCount = event.getPointerCount();
|
final int pointerCount = event.getPointerCount();
|
||||||
int action = event.getActionMasked();
|
int action = event.getActionMasked();
|
||||||
|
@ -1184,8 +1190,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||||
int i = -1;
|
int i = -1;
|
||||||
float x,y,p;
|
float x,y,p;
|
||||||
|
|
||||||
//Send events to touch controls
|
|
||||||
SDLActivity.controlInterp.onTouchEvent(event);
|
|
||||||
|
|
||||||
// !!! FIXME: dump this SDK check after 2.0.4 ships and require API14.
|
// !!! FIXME: dump this SDK check after 2.0.4 ships and require API14.
|
||||||
if (event.getSource() == InputDevice.SOURCE_MOUSE && SDLActivity.mSeparateMouseAndTouch) {
|
if (event.getSource() == InputDevice.SOURCE_MOUSE && SDLActivity.mSeparateMouseAndTouch) {
|
||||||
|
@ -1245,6 +1249,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sensor events
|
// Sensor events
|
||||||
|
|
Loading…
Add table
Reference in a new issue