Skip to content

Commit

Permalink
Cast the result of calling getButtonState to an Integer
Browse files Browse the repository at this point in the history
  • Loading branch information
josebagar committed Apr 1, 2015
1 parent c5d9d16 commit 41961e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -1140,7 +1140,7 @@ public boolean onTouch(View v, MotionEvent event) {
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.
}
Expand Down

0 comments on commit 41961e4

Please sign in to comment.