From 41961e4f313088832f9fdc16c4accd3eeba0fac1 Mon Sep 17 00:00:00 2001 From: Joseba Garc?a Etxebarria Date: Thu, 2 Apr 2015 00:55:45 +0200 Subject: [PATCH] Cast the result of calling getButtonState to an Integer --- android-project/src/org/libsdl/app/SDLActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 2a228d63e..bd047d638 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/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. }