Android: fix coordinates for Surface.ROTATION_180
authorSylvain Becker <sylvain.becker@gmail.com>
Tue, 11 Jun 2019 11:01:15 +0200
changeset 12830370a2c6f5a1d
parent 12829 5d13e8d106ae
child 12832 5b0c4bfbd083
Android: fix coordinates for Surface.ROTATION_180
https://discourse.libsdl.org/t/android-screen-orientation-issues-2-0-9/26262
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Tue Jun 11 10:19:26 2019 +0200
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Tue Jun 11 11:01:15 2019 +0200
     1.3 @@ -1971,8 +1971,8 @@
     1.4                      newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
     1.5                      break;
     1.6                  case Surface.ROTATION_180:
     1.7 -                    x = -event.values[1];
     1.8 -                    y = -event.values[0];
     1.9 +                    x = -event.values[0];
    1.10 +                    y = -event.values[1];
    1.11                      newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
    1.12                      break;
    1.13                  default: