aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android
diff options
context:
space:
mode:
authorCameron Cawley2019-05-09 18:58:09 +0100
committerCameron Cawley2019-05-09 18:58:09 +0100
commit6989e63a25f7e74e7e7531d17313c75a4bda597e (patch)
tree5f37f32b3dd5cd8b87eab0619822b590b0ff1660 /backends/platform/android
parent96660273fd44a251acc6bf48f9f260ba5858a668 (diff)
downloadscummvm-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')
-rw-r--r--backends/platform/android/android.h2
-rw-r--r--backends/platform/android/events.cpp2
-rw-r--r--backends/platform/android/jni.cpp6
-rw-r--r--backends/platform/android/jni.h2
-rw-r--r--backends/platform/android/org/scummvm/scummvm/MouseHelper.java16
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVM.java2
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java24
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVMEventsHoneycomb.java2
8 files changed, 28 insertions, 28 deletions
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 9f91a65b55..64c4d9c3f5 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -210,7 +210,7 @@ public:
}
public:
- void pushEvent(int type, int arg1, int arg2, int arg3, int arg4, int arg5);
+ void pushEvent(int type, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
private:
Common::Queue<Common::Event> _event_queue;
diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 9020bfd96e..4045bb5a95 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -140,7 +140,7 @@ void OSystem_Android::updateEventScale() {
}
void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
- int arg4, int arg5) {
+ int arg4, int arg5, int arg6) {
Common::Event e;
switch (type) {
diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp
index ed0999c880..47dd5c73cf 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -108,7 +108,7 @@ const JNINativeMethod JNI::_natives[] = {
(void *)JNI::setSurface },
{ "main", "([Ljava/lang/String;)I",
(void *)JNI::main },
- { "pushEvent", "(IIIIII)V",
+ { "pushEvent", "(IIIIIII)V",
(void *)JNI::pushEvent },
{ "enableZoning", "(Z)V",
(void *)JNI::enableZoning },
@@ -638,7 +638,7 @@ cleanup:
}
void JNI::pushEvent(JNIEnv *env, jobject self, int type, int arg1, int arg2,
- int arg3, int arg4, int arg5) {
+ int arg3, int arg4, int arg5, int arg6) {
// drop events until we're ready and after we quit
if (!_ready_for_events) {
LOGW("dropping event");
@@ -647,7 +647,7 @@ void JNI::pushEvent(JNIEnv *env, jobject self, int type, int arg1, int arg2,
assert(_system);
- _system->pushEvent(type, arg1, arg2, arg3, arg4, arg5);
+ _system->pushEvent(type, arg1, arg2, arg3, arg4, arg5, arg6);
}
void JNI::enableZoning(JNIEnv *env, jobject self, jboolean enable) {
diff --git a/backends/platform/android/jni.h b/backends/platform/android/jni.h
index b88155f8b6..e65e7f5dc8 100644
--- a/backends/platform/android/jni.h
+++ b/backends/platform/android/jni.h
@@ -129,7 +129,7 @@ private:
static jint main(JNIEnv *env, jobject self, jobjectArray args);
static void pushEvent(JNIEnv *env, jobject self, int type, int arg1,
- int arg2, int arg3, int arg4, int arg5);
+ int arg2, int arg3, int arg4, int arg5, int arg6);
static void enableZoning(JNIEnv *env, jobject self, jboolean enable);
static void setPause(JNIEnv *env, jobject self, jboolean value);
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;
}