• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Revisione392b1f2e115cd4417922900b19eed1b91baaba8 (tree)
Time2013-07-06 10:37:51
AuthorKazuhiko Kobayashi <chototsu_moushinp@yaho...>
Commiterkobayasi

Log Message

Fix touch event bug.

Change Summary

Incremental Difference

--- a/engine/src/android/com/jme3/input/android/AndroidInput.java
+++ b/engine/src/android/com/jme3/input/android/AndroidInput.java
@@ -290,6 +290,14 @@ public class AndroidInput extends GLSurfaceView implements TouchInput,
290290 touch.setTime(event.getEventTime());
291291 touch.setPressure(event.getPressure(p));
292292 processEvent(touch);
293+
294+ Vector2f lastPos = lastPositions.get(event.getPointerId(p));
295+ if (lastPos == null)
296+ {
297+ lastPos = new Vector2f(event.getX(p), this.getHeight() - event.getY(p));
298+ lastPositions.put(event.getPointerId(p), lastPos);
299+ }
300+ lastPos.set(event.getX(p), this.getHeight() - event.getY(p));
293301 }
294302
295303 bWasHandled = true;