v0.9.0: fixed lingering taps when using gestures on Android 11
This commit is contained in:
parent
34e8c4f6ab
commit
12b7e47883
|
@ -101,4 +101,13 @@ public class PointerEvent {
|
|||
}
|
||||
pointerEvents.clear();
|
||||
}
|
||||
|
||||
public static synchronized void clearPointerEvents(){
|
||||
pointerEvents.clear();
|
||||
for (PointerEvent p : activePointers.values()){
|
||||
p.current = p.start = new PointF(-1, -1);
|
||||
pointerSignal.dispatch(p.up());
|
||||
}
|
||||
activePointers.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import com.watabou.gltextures.TextureCache;
|
|||
import com.watabou.glwrap.Blending;
|
||||
import com.watabou.glwrap.Vertexbuffer;
|
||||
import com.watabou.input.InputHandler;
|
||||
import com.watabou.input.PointerEvent;
|
||||
import com.watabou.noosa.audio.Music;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Callback;
|
||||
|
@ -154,6 +155,8 @@ public class Game implements ApplicationListener {
|
|||
@Override
|
||||
public void pause() {
|
||||
paused = true;
|
||||
|
||||
PointerEvent.clearPointerEvents();
|
||||
|
||||
if (scene != null) {
|
||||
scene.onPause();
|
||||
|
|
Loading…
Reference in New Issue
Block a user