Browse Source

Cast the result of calling getButtonState to an Integer

Joseba Garc?a Etxebarria 10 years ago
parent
commit
41961e4f31
1 changed files with 1 additions and 1 deletions
  1. 1 1
      android-project/src/org/libsdl/app/SDLActivity.java

+ 1 - 1
android-project/src/org/libsdl/app/SDLActivity.java

@@ -1140,7 +1140,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
                 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.
                 }