Cast the result of calling getButtonState to an Integer
authorJoseba García Etxebarria <joseba.gar@gmail.com>
Thu, 02 Apr 2015 00:55:45 +0200
changeset 945349a34578d9e7
parent 9452 d16ad6375b01
child 9454 bdc0c1dda0a4
Cast the result of calling getButtonState to an Integer
android-project/src/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/src/org/libsdl/app/SDLActivity.java	Wed Apr 01 18:22:42 2015 -0700
     1.2 +++ b/android-project/src/org/libsdl/app/SDLActivity.java	Thu Apr 02 00:55:45 2015 +0200
     1.3 @@ -1140,7 +1140,7 @@
     1.4                  mouseButton = 1;    // For Android==12 all mouse buttons are the left button
     1.5              } else {
     1.6                  try {
     1.7 -                    mouseButton = event.getClass().getMethod("getButtonState").invoke(event);
     1.8 +                    mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
     1.9                  } catch(Exception e) {
    1.10                      mouseButton = 1;    // oh well.
    1.11                  }