SDL/android-project
Sam Lantinga 0c274ee25a 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 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() 2013-08-11 19:56:43 -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 Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() 2013-08-11 19:56:43 -07:00
ant.properties Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() 2013-08-11 19:56:43 -07:00
build.properties Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() 2013-08-11 19:56:43 -07:00
build.xml Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() 2013-08-11 19:56:43 -07:00
default.properties Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() 2013-08-11 19:56:43 -07:00
proguard-project.txt Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() 2013-08-11 19:56:43 -07:00
project.properties Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() 2013-08-11 19:56:43 -07:00