mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-10 19:29:46 +00:00
for 'pinch end' events on mobile devices, send dummy value -1 for (focus|span)_(x|y)
This commit is contained in:
@@ -1178,7 +1178,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
public static native void onNativeFileDialog(int requestCode, String[] filelist, int filter);
|
||||
public static native void onNativePinchStart(float span_x, float span_y, float focus_x, float focus_y);
|
||||
public static native void onNativePinchUpdate(float scale, float span_x, float span_y, float focus_x, float focus_y);
|
||||
public static native void onNativePinchEnd(float span_x, float span_y, float focus_x, float focus_y);
|
||||
public static native void onNativePinchEnd();
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
|
||||
@@ -460,11 +460,7 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
|
||||
@Override
|
||||
public void onScaleEnd(ScaleGestureDetector detector) {
|
||||
float span_x = getNormalizedX(detector.getCurrentSpanX());
|
||||
float span_y = getNormalizedY(detector.getCurrentSpanY());
|
||||
float focus_x = getNormalizedX(detector.getFocusX());
|
||||
float focus_y = getNormalizedY(detector.getFocusY());
|
||||
SDLActivity.onNativePinchEnd(span_x, span_y, focus_x, focus_y);
|
||||
SDLActivity.onNativePinchEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user