androidjoystick: normalize pressure and radius, according to python-for-android / API doc

This commit is contained in:
Mathieu Virbel 2012-11-01 12:18:49 +01:00
parent ec80be21b0
commit f1cfe335dc
1 changed files with 2 additions and 2 deletions

View File

@ -68,8 +68,8 @@ class AndroidMotionEventProvider(MotionEventProvider):
pressed = joy.get_button(0)
x = joy.get_axis(0) * 32768. / w
y = 1. - (joy.get_axis(1) * 32768. / h)
pressure = joy.get_axis(2)
radius = joy.get_axis(3)
pressure = joy.get_axis(2) / 1000. # python for android do * 1000.
radius = joy.get_axis(3) / 1000. # python for android do * 1000.
# new touche ?
if pressed and jid not in touches: