fixed Android issues with new onscreen buttons.

fixed some stability issue with the deck viewer.
This commit is contained in:
techdragon.nguyen@gmail.com
2012-02-21 12:53:11 +00:00
parent 641c4068d8
commit cecf5f8060
2 changed files with 12 additions and 7 deletions

View File

@@ -801,8 +801,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
// calc velocity
mVelocityTracker.computeCurrentVelocity(1000);
SDLActivity.onNativeFlickGesture(mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity());
float xVelocity = mVelocityTracker.getXVelocity(0);
float yVelocity = mVelocityTracker.getYVelocity(0);
if ( Math.abs(xVelocity) > 300 || Math.abs(yVelocity) > 300)
SDLActivity.onNativeFlickGesture(xVelocity, yVelocity);
mVelocityTracker.recycle();
}