SDL/android-project
Sam Lantinga 7ae171d15e 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 Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03: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 Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
ant.properties Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
build.properties Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
build.xml Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
default.properties Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
proguard-project.txt Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
project.properties Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00