SDL-mirror/android-project
Sam Lantinga 84d3120257 Fixed bug 2155 - automatically remap accelerometer coordinates according to screen orientation on Android
Denis Bernard

Background information: http://android-developers.blogspot.fr/2010/09/one-screen-turn-deserves-another.html and http://developer.android.com/reference/android/hardware/SensorEvent.html

Right now, the Android accelerometer event handler feeds raw accelerometer data  to the SDL Joystick driver. The result is that for landscape-only applications, the axis need to be swapped if running on a portrait device (like a phone), and vice-versa: running a portrait only app on a landscape device like a tablet.

The purpose of this patch is to perform coordinate remapping of the accelerometer data before feeding it to the SDL joystick driver so that the X axis of the joystick is always aligned with the X axis of the display, same for the Y axis.

This has been tested on applications that support screen orientation changes as well as applications with fixed screen orientations, both on phones and tablets.
2013-10-17 23:44:30 -07:00
..
jni Fixed bug 2146 - Enable static linking of libSDL on Android 2013-10-10 21:51:39 -07:00
res Fixed bug 1779 - SDL's Android project template has old default icons from Android. 2013-04-02 07:55:25 -07:00
src/org/libsdl/app Fixed bug 2155 - automatically remap accelerometer coordinates according to screen orientation on Android 2013-10-17 23:44:30 -07:00
AndroidManifest.xml Updated names of README files in source comments. 2013-06-09 11:58:31 +02:00
ant.properties Updated the Android project template and README.android 2012-11-02 02:37:49 -07:00
build.properties Added the Android project and lots of info to README.android 2011-01-06 17:12:31 -08:00
build.xml Updated the Android project template and README.android 2012-11-02 02:37:49 -07:00
default.properties Updated the Android project template and README.android 2012-11-02 02:37:49 -07:00
proguard-project.txt Updated the Android project template and README.android 2012-11-02 02:37:49 -07:00
project.properties Backed out changeset: 9cef1005df5f 2013-04-01 13:20:22 -03:00