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 9453 49a34578d9e7
parent 9452 d16ad6375b01
child 9454 bdc0c1dda0a4
Cast the result of calling getButtonState to an Integer
android-project/src/org/libsdl/app/SDLActivity.java
--- a/android-project/src/org/libsdl/app/SDLActivity.java	Wed Apr 01 18:22:42 2015 -0700
+++ b/android-project/src/org/libsdl/app/SDLActivity.java	Thu Apr 02 00:55:45 2015 +0200
@@ -1140,7 +1140,7 @@
                 mouseButton = 1;    // For Android==12 all mouse buttons are the left button
             } else {
                 try {
-                    mouseButton = event.getClass().getMethod("getButtonState").invoke(event);
+                    mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
                 } catch(Exception e) {
                     mouseButton = 1;    // oh well.
                 }