diff -r 076043572704 src/core/android/SDL_android.cpp --- a/src/core/android/SDL_android.cpp vie dic 23 18:07:42 2011 -0300 +++ b/src/core/android/SDL_android.cpp mar dic 27 15:44:37 2011 -0300 @@ -186,6 +186,16 @@ } } +extern "C" void Java_org_libsdl_app_SDLActivity_onNativeOffsetsChanged( + JNIEnv* env, jclass cls, jfloat x, jfloat y) +{ + // Send the offset change as a fake window movement...windows don't really move in Android, they don't even exist! + // In a five "desktops" Android, x is 0.0 for the left most desktop, then 0.25, 0.5, 0.75 and 1 for the right most + if (Android_Window) { + SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_MOVED, (int)(x*256.0f), (int)(y*256.0f)); + } +} + extern "C" void Java_org_libsdl_app_SDLActivity_nativeRunAudioThread( JNIEnv* env, jclass cls) {