Cast the result of calling getButtonState to an Integer
This commit is contained in:
parent
9549f560ba
commit
ddad0a1315
1 changed files with 1 additions and 1 deletions
|
@ -1140,7 +1140,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||||
mouseButton = 1; // For Android==12 all mouse buttons are the left button
|
mouseButton = 1; // For Android==12 all mouse buttons are the left button
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
mouseButton = event.getClass().getMethod("getButtonState").invoke(event);
|
mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
mouseButton = 1; // oh well.
|
mouseButton = 1; // oh well.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue