From 02e5cd3ee2fb38ba762491206853697c51cf42e4 Mon Sep 17 00:00:00 2001 From: TwistedUmbrella Date: Mon, 27 Jan 2014 02:00:42 -0500 Subject: [PATCH] Make sure the visual buttons are available to "press" them --- shell/android/src/com/reicast/emulator/GL2JNIActivity.java | 3 ++- shell/android/src/com/reicast/emulator/MOGAInput.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/android/src/com/reicast/emulator/GL2JNIActivity.java b/shell/android/src/com/reicast/emulator/GL2JNIActivity.java index 18344488c..22270c249 100644 --- a/shell/android/src/com/reicast/emulator/GL2JNIActivity.java +++ b/shell/android/src/com/reicast/emulator/GL2JNIActivity.java @@ -531,13 +531,14 @@ public class GL2JNIActivity extends Activity { x = 440 + LxC + 1; y = 200 + LyC + 1; } - if (keyCode == prefs.getInt("l_button" + id, OuyaController.BUTTON_R1)) { + if (keyCode == prefs.getInt("r_button" + id, OuyaController.BUTTON_R1)) { float RxC = prefs.getFloat("touch_x_shift_right_trigger", 0); float RyC = prefs.getFloat("touch_y_shift_right_trigger", 0); x = 542 + RxC + 1; y = 200 + RyC + 1; } if (x != -1 || y != -1) { + JNIdc.show_osd(); long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis() + 100; int metaState = 0; diff --git a/shell/android/src/com/reicast/emulator/MOGAInput.java b/shell/android/src/com/reicast/emulator/MOGAInput.java index ef399aaa9..f1d93a59f 100644 --- a/shell/android/src/com/reicast/emulator/MOGAInput.java +++ b/shell/android/src/com/reicast/emulator/MOGAInput.java @@ -195,13 +195,14 @@ public class MOGAInput x = 440 + LxC + 1; y = 200 + LyC + 1; } - if (event.getKeyCode() == prefs.getInt("l_button" + id, OuyaController.BUTTON_R1)) { + if (event.getKeyCode() == prefs.getInt("r_button" + id, OuyaController.BUTTON_R1)) { float RxC = prefs.getFloat("touch_x_shift_right_trigger", 0); float RyC = prefs.getFloat("touch_y_shift_right_trigger", 0); x = 542 + RxC + 1; y = 200 + RyC + 1; } if (mView != null && (x != -1 || y != -1)) { + JNIdc.show_osd(); long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis() + 100; int metaState = 0;