openframeworks/openFrameworks — pull request #1906 by falcon4ever (2013-03-03 13:33:36+00:00)
Title: Fixed onTouchMoved historical event handling

This one is found by Jeff Brown (Google), I'm just passing on the bugfix.

"In OFAndroid.java, line 1011, there's a bug in the way the historical events are handled. The clue here is the exception handler which shouldn't be needed.

int ptr = event.getPointerId(j);
OFAndroid.onTouchMoved(ptr, event.getHistoricalX(ptr, i), event.getHistoricalY(ptr, i), event.getHistoricalPressure(ptr, i));

In the above code, the calls to getHistoricalX(), getHistoricalY() and getHistoricalPressure() should be passing "j" as the argument, not "ptr". The first argument is intended to be the pointer index, not the pointer id. Once you do that, you'll find you can remove the try/catch for IllegalArgumentException."

Reference: http://developer.android.com/reference/android/view/MotionEvent.html