SDL_Java_RMB_fix.patch 1.1 KB

123456789101112131415161718
  1. diff --git a/android/app/src/main/java/org/libsdl/app/SDLActivity.java b/android/app/src/main/java/org/libsdl/app/SDLActivity.java
  2. index fd5a056e3..83e3cf657 100644
  3. --- a/android/app/src/main/java/org/libsdl/app/SDLActivity.java
  4. +++ b/android/app/src/main/java/org/libsdl/app/SDLActivity.java
  5. @@ -1345,7 +1345,12 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
  6. }
  7. }
  8. - if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
  9. + if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE ||
  10. + /*
  11. + * CUSTOM ADDITION FOR MINETEST
  12. + * should be upstreamed
  13. + */
  14. + (source & InputDevice.SOURCE_MOUSE_RELATIVE) == InputDevice.SOURCE_MOUSE_RELATIVE) {
  15. // on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
  16. // they are ignored here because sending them as mouse input to SDL is messy
  17. if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {