diff options
author | Cameron Cawley | 2019-05-09 18:58:09 +0100 |
---|---|---|
committer | Cameron Cawley | 2019-05-09 18:58:09 +0100 |
commit | 6989e63a25f7e74e7e7531d17313c75a4bda597e (patch) | |
tree | 5f37f32b3dd5cd8b87eab0619822b590b0ff1660 /backends/platform/android/org | |
parent | 96660273fd44a251acc6bf48f9f260ba5858a668 (diff) | |
download | scummvm-rg350-6989e63a25f7e74e7e7531d17313c75a4bda597e.tar.gz scummvm-rg350-6989e63a25f7e74e7e7531d17313c75a4bda597e.tar.bz2 scummvm-rg350-6989e63a25f7e74e7e7531d17313c75a4bda597e.zip |
ANDROID: Make pushEvent take 7 parameters instead of 6
Diffstat (limited to 'backends/platform/android/org')
4 files changed, 22 insertions, 22 deletions
diff --git a/backends/platform/android/org/scummvm/scummvm/MouseHelper.java b/backends/platform/android/org/scummvm/scummvm/MouseHelper.java index 8990515b84..b0f81a72ea 100644 --- a/backends/platform/android/org/scummvm/scummvm/MouseHelper.java +++ b/backends/platform/android/org/scummvm/scummvm/MouseHelper.java @@ -70,8 +70,8 @@ public class MouseHelper { } public boolean onMouseEvent(MotionEvent e, boolean hover) { - _scummvm.pushEvent(ScummVMEvents.JE_MOUSE_MOVE, (int)e.getX(), (int)e.getY(), 0, 0, 0); - + _scummvm.pushEvent(ScummVMEvents.JE_MOUSE_MOVE, (int)e.getX(), (int)e.getY(), 0, 0, 0, 0); + int buttonState = e.getButtonState(); boolean lmbDown = (buttonState & MotionEvent.BUTTON_PRIMARY) == MotionEvent.BUTTON_PRIMARY; @@ -84,14 +84,14 @@ public class MouseHelper { if (lmbDown) { if (!_lmbPressed) { // left mouse button was pressed just now - _scummvm.pushEvent(ScummVMEvents.JE_LMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); + _scummvm.pushEvent(ScummVMEvents.JE_LMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0, 0); } _lmbPressed = true; } else { if (_lmbPressed) { // left mouse button was released just now - _scummvm.pushEvent(ScummVMEvents.JE_LMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); + _scummvm.pushEvent(ScummVMEvents.JE_LMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0, 0); } _lmbPressed = false; @@ -101,14 +101,14 @@ public class MouseHelper { if (rmbDown) { if (!_rmbPressed) { // right mouse button was pressed just now - _scummvm.pushEvent(ScummVMEvents.JE_RMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); + _scummvm.pushEvent(ScummVMEvents.JE_RMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0, 0); } _rmbPressed = true; } else { if (_rmbPressed) { // right mouse button was released just now - _scummvm.pushEvent(ScummVMEvents.JE_RMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); + _scummvm.pushEvent(ScummVMEvents.JE_RMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0, 0); _rmbGuardTime = System.currentTimeMillis(); } @@ -119,14 +119,14 @@ public class MouseHelper { if (mmbDown) { if (!_mmbPressed) { // middle mouse button was pressed just now - _scummvm.pushEvent(ScummVMEvents.JE_MMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); + _scummvm.pushEvent(ScummVMEvents.JE_MMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0, 0); } _mmbPressed = true; } else { if (_mmbPressed) { // middle mouse button was released just now - _scummvm.pushEvent(ScummVMEvents.JE_MMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); + _scummvm.pushEvent(ScummVMEvents.JE_MMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0, 0); } _mmbPressed = false; diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVM.java b/backends/platform/android/org/scummvm/scummvm/ScummVM.java index 163b50f42d..7b6627f667 100644 --- a/backends/platform/android/org/scummvm/scummvm/ScummVM.java +++ b/backends/platform/android/org/scummvm/scummvm/ScummVM.java @@ -48,7 +48,7 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable { final public native void enableZoning(boolean enable); // Feed an event to ScummVM. Safe to call from other threads. final public native void pushEvent(int type, int arg1, int arg2, int arg3, - int arg4, int arg5); + int arg4, int arg5, int arg6); final public native String getCurrentCharset(); // Callbacks from C++ peer instance diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java b/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java index e81000d8b1..67609e0026 100644 --- a/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java +++ b/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java @@ -57,14 +57,14 @@ public class ScummVMEvents implements } final public void sendQuitEvent() { - _scummvm.pushEvent(JE_QUIT, 0, 0, 0, 0, 0); + _scummvm.pushEvent(JE_QUIT, 0, 0, 0, 0, 0, 0); } public boolean onTrackballEvent(MotionEvent e) { _scummvm.pushEvent(JE_BALL, e.getAction(), (int)(e.getX() * e.getXPrecision() * 100), (int)(e.getY() * e.getYPrecision() * 100), - 0, 0); + 0, 0, 0); return true; } @@ -155,7 +155,7 @@ public class ScummVMEvents implements return true; } - _scummvm.pushEvent(JE_SYS_KEY, action, keyCode, 0, 0, 0); + _scummvm.pushEvent(JE_SYS_KEY, action, keyCode, 0, 0, 0, 0); return true; } @@ -172,7 +172,7 @@ public class ScummVMEvents implements for (KeyEvent s : es) { _scummvm.pushEvent(JE_KEY, s.getAction(), s.getKeyCode(), s.getUnicodeChar() & KeyCharacterMap.COMBINING_ACCENT_MASK, - s.getMetaState(), s.getRepeatCount()); + s.getMetaState(), s.getRepeatCount(), 0); } return true; @@ -186,7 +186,7 @@ public class ScummVMEvents implements case KeyEvent.KEYCODE_DPAD_CENTER: _scummvm.pushEvent(JE_DPAD, action, keyCode, (int)(e.getEventTime() - e.getDownTime()), - e.getRepeatCount(), 0); + e.getRepeatCount(), 0, 0); return true; case KeyEvent.KEYCODE_BUTTON_A: case KeyEvent.KEYCODE_BUTTON_B: @@ -205,13 +205,13 @@ public class ScummVMEvents implements case KeyEvent.KEYCODE_BUTTON_MODE: _scummvm.pushEvent(JE_GAMEPAD, action, keyCode, (int)(e.getEventTime() - e.getDownTime()), - e.getRepeatCount(), 0); + e.getRepeatCount(), 0, 0); return true; } _scummvm.pushEvent(JE_KEY, action, keyCode, e.getUnicodeChar() & KeyCharacterMap.COMBINING_ACCENT_MASK, - e.getMetaState(), e.getRepeatCount()); + e.getMetaState(), e.getRepeatCount(), 0); return true; } @@ -235,7 +235,7 @@ public class ScummVMEvents implements if (pointer > 0) { _scummvm.pushEvent(JE_MULTI, pointer, action & 0xff, // ACTION_MASK - (int)e.getX(), (int)e.getY(), 0); + (int)e.getX(), (int)e.getY(), 0, 0); return true; } @@ -245,7 +245,7 @@ public class ScummVMEvents implements // OnGestureListener @Override final public boolean onDown(MotionEvent e) { - _scummvm.pushEvent(JE_DOWN, (int)e.getX(), (int)e.getY(), 0, 0, 0); + _scummvm.pushEvent(JE_DOWN, (int)e.getX(), (int)e.getY(), 0, 0, 0, 0); return true; } @@ -268,7 +268,7 @@ public class ScummVMEvents implements final public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { _scummvm.pushEvent(JE_SCROLL, (int)e1.getX(), (int)e1.getY(), - (int)e2.getX(), (int)e2.getY(), 0); + (int)e2.getX(), (int)e2.getY(), 0, 0); return true; } @@ -280,7 +280,7 @@ public class ScummVMEvents implements @Override final public boolean onSingleTapUp(MotionEvent e) { _scummvm.pushEvent(JE_TAP, (int)e.getX(), (int)e.getY(), - (int)(e.getEventTime() - e.getDownTime()), 0, 0); + (int)(e.getEventTime() - e.getDownTime()), 0, 0, 0); return true; } @@ -294,7 +294,7 @@ public class ScummVMEvents implements @Override final public boolean onDoubleTapEvent(MotionEvent e) { _scummvm.pushEvent(JE_DOUBLE_TAP, (int)e.getX(), (int)e.getY(), - e.getAction(), 0, 0); + e.getAction(), 0, 0, 0); return true; } diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMEventsHoneycomb.java b/backends/platform/android/org/scummvm/scummvm/ScummVMEventsHoneycomb.java index ab85429040..6061763d02 100644 --- a/backends/platform/android/org/scummvm/scummvm/ScummVMEventsHoneycomb.java +++ b/backends/platform/android/org/scummvm/scummvm/ScummVMEventsHoneycomb.java @@ -16,7 +16,7 @@ public class ScummVMEventsHoneycomb extends ScummVMEvents { _scummvm.pushEvent(JE_JOYSTICK, e.getAction(), (int)(e.getAxisValue(MotionEvent.AXIS_X)*100), (int)(e.getAxisValue(MotionEvent.AXIS_Y)*100), - 0, 0); + 0, 0, 0); return true; } |