diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNIActivity.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNIActivity.java index 6705a8eae..0a45d1965 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNIActivity.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNIActivity.java @@ -358,19 +358,18 @@ public class GL2JNIActivity extends Activity { } else { GL2JNIView.lt[playerNum] = (int) (L2 * 255); GL2JNIView.rt[playerNum] = (int) (R2 * 255); - - if (prefs.getInt(Gamepad.pref_js_rstick + pad.portId[playerNum], 0) == 2) { - if (RS_Y > 0.25) { - handle_key(playerNum, pad.map[playerNum][0]/* A */, true); - pad.wasKeyStick[playerNum] = true; - } else if (RS_Y < 0.25) { - handle_key(playerNum, pad.map[playerNum][1]/* B */, true); - pad.wasKeyStick[playerNum] = true; - } else if (pad.wasKeyStick[playerNum]) { - handle_key(playerNum, pad.map[playerNum][0], false); - handle_key(playerNum, pad.map[playerNum][1], false); - pad.wasKeyStick[playerNum] = false; - } + } + if (prefs.getInt(Gamepad.pref_js_rstick + pad.portId[playerNum], 0) == 2) { + if (RS_Y > 0.25) { + handle_key(playerNum, pad.map[playerNum][0]/* A */, true); + pad.wasKeyStick[playerNum] = true; + } else if (RS_Y < 0.25) { + handle_key(playerNum, pad.map[playerNum][1]/* B */, true); + pad.wasKeyStick[playerNum] = true; + } else if (pad.wasKeyStick[playerNum]) { + handle_key(playerNum, pad.map[playerNum][0], false); + handle_key(playerNum, pad.map[playerNum][1], false); + pad.wasKeyStick[playerNum] = false; } } diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNINative.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNINative.java index c80c0edc2..a76dc539a 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNINative.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNINative.java @@ -358,19 +358,18 @@ public class GL2JNINative extends NativeActivity { } else { GL2JNIView.lt[playerNum] = (int) (L2 * 255); GL2JNIView.rt[playerNum] = (int) (R2 * 255); - - if (prefs.getInt(Gamepad.pref_js_rstick + pad.portId[playerNum], 0) == 2) { - if (RS_Y > 0.25) { - handle_key(playerNum, pad.map[playerNum][0]/* A */, true); - pad.wasKeyStick[playerNum] = true; - } else if (RS_Y < 0.25) { - handle_key(playerNum, pad.map[playerNum][1]/* B */, true); - pad.wasKeyStick[playerNum] = true; - } else if (pad.wasKeyStick[playerNum]) { - handle_key(playerNum, pad.map[playerNum][0], false); - handle_key(playerNum, pad.map[playerNum][1], false); - pad.wasKeyStick[playerNum] = false; - } + } + if (prefs.getInt(Gamepad.pref_js_rstick + pad.portId[playerNum], 0) == 2) { + if (RS_Y > 0.25) { + handle_key(playerNum, pad.map[playerNum][0]/* A */, true); + pad.wasKeyStick[playerNum] = true; + } else if (RS_Y < 0.25) { + handle_key(playerNum, pad.map[playerNum][1]/* B */, true); + pad.wasKeyStick[playerNum] = true; + } else if (pad.wasKeyStick[playerNum]) { + handle_key(playerNum, pad.map[playerNum][0], false); + handle_key(playerNum, pad.map[playerNum][1], false); + pad.wasKeyStick[playerNum] = false; } } diff --git a/shell/android-studio/reicast/src/main/res/layout-v14/input_fragment.xml b/shell/android-studio/reicast/src/main/res/layout-v14/input_fragment.xml index 91738d995..0c004797d 100644 --- a/shell/android-studio/reicast/src/main/res/layout-v14/input_fragment.xml +++ b/shell/android-studio/reicast/src/main/res/layout-v14/input_fragment.xml @@ -22,6 +22,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:ems="10" + android:layout_marginLeft="4dp" android:text="@string/customize_touch_controls" /> @@ -85,6 +87,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" + android:layout_marginLeft="4dp" android:text="@string/vibration_duration" /> - + android:stretchColumns="*" > - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +