diff --git a/engine/src/android/com/jme3/input/android/AndroidInput.java b/engine/src/android/com/jme3/input/android/AndroidInput.java index 07468de49..73ca2d191 100644 --- a/engine/src/android/com/jme3/input/android/AndroidInput.java +++ b/engine/src/android/com/jme3/input/android/AndroidInput.java @@ -396,7 +396,11 @@ public class AndroidInput implements private void processEvent(TouchEvent event) { synchronized (eventQueue) { - eventQueue.push(event); + //Discarding events when the ring buffer is full to avoid buffer overflow. + if(eventQueue.size()< MAX_EVENTS){ + eventQueue.push(event); + } + } }