AndroidInput : Discarded new events when the eventQueue is full to avoid an overflow error. This should only append when more than 1024 events are generated before they've been transformd to JME input events.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10431 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 12 years ago
parent a5dbe2306c
commit 9e3a98931a
  1. 4
      engine/src/android/com/jme3/input/android/AndroidInput.java

@ -396,8 +396,12 @@ public class AndroidInput implements
private void processEvent(TouchEvent event) {
synchronized (eventQueue) {
//Discarding events when the ring buffer is full to avoid buffer overflow.
if(eventQueue.size()< MAX_EVENTS){
eventQueue.push(event);
}
}
}
// --------------- INSIDE GLThread ---------------

Loading…
Cancel
Save