diff --git a/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java b/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java index cf7518028c..e9ef01937e 100644 --- a/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java +++ b/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java @@ -5,6 +5,8 @@ import android.graphics.PointF; import android.view.MotionEvent; import net.osmand.PlatformUtil; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandSettings; import net.osmand.util.MapUtils; import org.apache.commons.logging.Log; @@ -45,6 +47,7 @@ public class MultiTouchSupport { private boolean multiTouchAPISupported = false; private final MultiTouchZoomListener listener; protected final Context ctx; + private OsmandSettings settings; protected Method getPointerCount; protected Method getX; @@ -71,6 +74,7 @@ public class MultiTouchSupport { } private void initMethods(){ + settings = ((OsmandApplication) ctx.getApplicationContext()).getSettings(); try { getPointerCount = MotionEvent.class.getMethod("getPointerCount"); //$NON-NLS-1$ getPointerId = MotionEvent.class.getMethod("getPointerId", Integer.TYPE); //$NON-NLS-1$ @@ -166,7 +170,8 @@ public class MultiTouchSupport { if (dx1 < TILT_X_THRESHOLD_PX && dx2 < TILT_X_THRESHOLD_PX && dy1 > TILT_Y_THRESHOLD_PX && dy2 > TILT_Y_THRESHOLD_PX && startDy < TILT_Y_THRESHOLD_PX * 6 - && Math.abs(dy2 - dy1) < TILT_DY_THRESHOLD_PX) { + && Math.abs(dy2 - dy1) < TILT_DY_THRESHOLD_PX + && settings.USE_OPENGL_RENDER.get()) { listener.onChangeViewAngleStarted(); inTiltMode = true; } else if (dx1 > TILT_X_THRESHOLD_PX || dx2 > TILT_X_THRESHOLD_PX