From 9c91d09d1824ec6adc4f252cbe30feab0ba27179 Mon Sep 17 00:00:00 2001 From: benfry Date: Fri, 6 Aug 2010 13:11:01 +0000 Subject: [PATCH] several todo items, and trying to deal with motion array overload --- android/core/src/processing/core/PApplet.java | 11 ++++-- android/todo.txt | 38 +++++++++++++------ 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/android/core/src/processing/core/PApplet.java b/android/core/src/processing/core/PApplet.java index 7e90f3680..a30fc4f53 100644 --- a/android/core/src/processing/core/PApplet.java +++ b/android/core/src/processing/core/PApplet.java @@ -1840,16 +1840,19 @@ public class PApplet extends Activity implements PConstants, Runnable { } } // allocate more PMotionEvent objects if we're out - if (motionEventCount + event.getHistorySize() >= motionEventQueue.length) { - PMotionEvent[] temp = new PMotionEvent[motionEventCount << 1]; -// System.out.println("allocating " + temp.length + " entries for motion events"); + int historyCount = event.getHistorySize(); +// println("motion: " + motionEventCount + " " + historyCount + " " + motionEventQueue.length); + if (motionEventCount + historyCount >= motionEventQueue.length) { + int atLeast = motionEventCount + historyCount + 1; + PMotionEvent[] temp = new PMotionEvent[max(atLeast, motionEventCount << 1)]; +println("motion: " + motionEventCount + " " + historyCount + " " + motionEventQueue.length); +println("allocating " + temp.length + " entries for motion events"); System.arraycopy(motionEventQueue, 0, temp, 0, motionEventCount); motionEventQueue = temp; for (int i = motionEventCount; i < motionEventQueue.length; i++) { motionEventQueue[i] = new PMotionEvent(); } } - int historyCount = event.getHistorySize(); // this will be the last event in the list PMotionEvent pme = motionEventQueue[motionEventCount + historyCount]; diff --git a/android/todo.txt b/android/todo.txt index 49b472a72..e54df3ec6 100644 --- a/android/todo.txt +++ b/android/todo.txt @@ -29,20 +29,38 @@ X http://code.google.com/p/processing/issues/detail?id=221 X change skewX/Y to shearX/Y _ need updated reference for this -http://developer.android.com/reference/android/view/KeyEvent.html -key == KeyEvent.KEYCODE_BACK (why not keyCode?) - -included -KEYCODE_MENU -KEYCODE_BACK -KEYCODE_DPAD_CENTER --> DPAD? - not included KEYCODE_VOLUME_DOWN KEYCODE_VOLUME_UP KEYCODE_CAMERA KEYCODE_HOME +create new keystore +location: [ ] (browse) +password: [ ] +confirm: [ ] +then asks for +alias, password, confirm, validity (years) +first/last name, ounit, org, city/locale, state/province, country code (xx) + +_ application local storage: context.getFilesDir().getPath() +"For those of you interested, the internal 8GB of storage on the phone +is mounted at /emmc (r/w mode, of course) and microSD cards still +shows up normally at /sdcard as expected." + +_ add to wiki - rename 'data' folder to 'assets' when inside eclipse +_ other useful tidbits (handlers etc) +_ http://developer.android.com/guide/appendix/faq/commontasks.html + +_ simple example of reading the compass (also note that won't work w/ sim) +_ and also the gps, i assume (can do fake data w/ sim) + +_ add hutch stuff to the wiki +http://lukehutch.wordpress.com/2010/01/06/my-multi-touch-code-ported-to-eclair/ + +_ maybe the back button shouldn't quit apps, the home button should? +_ back button use in apps is so infuriating... + P1 _ exceptions with StreamPump and adb devices on osx and linux P1 _ http://dev.processing.org/bugs/show_bug.cgi?id=1545 P1 _ http://dev.processing.org/bugs/show_bug.cgi?id=1527 @@ -286,11 +304,9 @@ P2 _ http://dev.processing.org/bugs/show_bug.cgi?id=1379 P2 _ save state re: whether sketches are android or java mode (or others?) P2 _ http://dev.processing.org/bugs/show_bug.cgi?id=1380 -_ compiler errors on Windows not highlighting line number +_ compiler errors on Windows not appearing, nor highlighting the line number _ http://code.google.com/p/processing/issues/detail?id=253 -P3 _ compiler errors not appearing properly on windows -P3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1546 P3 _ remove various debug messages on the console P3 _ right now, there are too many places where errors occur P3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1385