mirror of
https://github.com/yawut/SDL.git
synced 2026-06-03 22:55:17 -05:00
morgan.devel@gmail.com 2012-01-13 00:32:23 PST The android version of SDL_SYS_JoystickUpdate doesn't check if there is actually new data and always generate the SDL_JOYAXISMOTION event. Consequently, doing a while(SDL_PollEvent()) will result in an endless loop. The attached patch fix this issue. It also scale the incoming values properly in the Sint16 range. The scale from [-gravity;+gravity] is done directly in the java part because one may want to map the sensor values with a non-linear method for example. |
||
|---|---|---|
| .. | ||
| SDLActivity.java | ||