summaryrefslogtreecommitdiff
path: root/Source/Android/src/org
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-11-24 15:04:53 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2013-11-24 15:04:53 -0600
commitf6f2b1fc60067b19068f2d0edbbfbfe5e73a0806 (patch)
treef2ac5a15688b1811c3b6733b99d069657c7dd87a /Source/Android/src/org
parent42f8562e5c7acfb6b697672f419f0f28366a5261 (diff)
[Android-overlay] Support multiple gamepads with touch screen controls.
Diffstat (limited to 'Source/Android/src/org')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java10
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java8
2 files changed, 10 insertions, 8 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java b/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
index 7745deadba..ac6275301d 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
@@ -56,19 +56,21 @@ public final class NativeLibrary
/**
* Handles touch events.
*
- * @param Button Key code identifying which button was pressed.
+ * @param padID Identifier for which GCpad 0-3,
+ * @param Button Key code identifying which button was pressed,
* @param Action Mask for the action being performed.
*/
- public static native void onTouchEvent(int Button, int Action);
+ public static native void onTouchEvent(int padID, int Button, int Action);
/**
* Handles axis-related touch events.
*
- * @param Axis Axis ID for the type of axis being altered. (Example: Main stick up, down, left, right, etc).
+ * @param padID Identifier for which GCpad 0-3,
+ * @param Axis Axis ID for the type of axis being altered. (Example: Main stick up, down, left, right, etc),
* @param force How 'far down' the joystick is pushed down. 0.0f indicates center (or no force),
* 1.0f indicates max force (or joystick pushed all the way down in any arbitrary direction).
*/
- public static native void onTouchAxisEvent(int Axis, float force);
+ public static native void onTouchAxisEvent(int padID, int Axis, float force);
/**
* Handles button press events for a gamepad.
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java b/Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java
index 26f628ed46..4f34df7dc6 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java
@@ -96,15 +96,15 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
switch (button.getId())
{
case ButtonType.BUTTON_A:
- NativeLibrary.onTouchEvent(ButtonType.BUTTON_A, buttonState);
+ NativeLibrary.onTouchEvent(0, ButtonType.BUTTON_A, buttonState);
break;
case ButtonType.BUTTON_B:
- NativeLibrary.onTouchEvent(ButtonType.BUTTON_B, buttonState);
+ NativeLibrary.onTouchEvent(0, ButtonType.BUTTON_B, buttonState);
break;
case ButtonType.BUTTON_START:
- NativeLibrary.onTouchEvent(ButtonType.BUTTON_START, buttonState);
+ NativeLibrary.onTouchEvent(0, ButtonType.BUTTON_START, buttonState);
break;
default:
@@ -121,7 +121,7 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
for (int a = 0; a < 4; ++a)
{
- NativeLibrary.onTouchAxisEvent(axisIDs[a], axises[a]);
+ NativeLibrary.onTouchAxisEvent(0, axisIDs[a], axises[a]);
}
}