diff --git a/.gitignore b/.gitignore index 7a4174c6c..b6c540765 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ newdc/android/libnewdc/bin/libnewdc.jar newdc/android/libnewdc/bin/classes/com/example/newdc/JNIdc.class shell/android/assets/build +shell/android/tools # iOS/Xcode general stuff .DS_Store diff --git a/shell/android/assets/build b/shell/android/assets/build index f01dc06cf..c43f0674f 100644 --- a/shell/android/assets/build +++ b/shell/android/assets/build @@ -1 +1 @@ -382f2e5c19c85627f23bdc8e6cc2c59c97262bc3 \ No newline at end of file +6097b6f5b009454b5c041f89f429f96aa1e795f6 \ No newline at end of file diff --git a/shell/android/src/com/reicast/emulator/GL2JNIActivity.java b/shell/android/src/com/reicast/emulator/GL2JNIActivity.java index 156358b07..214aa6c55 100644 --- a/shell/android/src/com/reicast/emulator/GL2JNIActivity.java +++ b/shell/android/src/com/reicast/emulator/GL2JNIActivity.java @@ -224,13 +224,17 @@ public class GL2JNIActivity extends Activity { } private void initJoyStickLayout(int playerNum) { - pad.globalLS_X[playerNum] = pad.previousLS_X[playerNum] = 0.0f; - pad.globalLS_Y[playerNum] = pad.previousLS_Y[playerNum] = 0.0f; + if (!pad.joystick[playerNum]) { + pad.globalLS_X[playerNum] = pad.previousLS_X[playerNum] = 0.0f; + pad.globalLS_Y[playerNum] = pad.previousLS_Y[playerNum] = 0.0f; + } } private void runCompatibilityMode() { for (int n = 0; n < 4; n++) { if (pad.compat[n]) { + String id = pad.portId[n]; + pad.joystick[n] = prefs.getBoolean(Gamepad.pref_js_separate + id, false); getCompatibilityMap(n, pad.portId[n]); initJoyStickLayout(n); } diff --git a/shell/android/src/com/reicast/emulator/GL2JNINative.java b/shell/android/src/com/reicast/emulator/GL2JNINative.java index 49b9d25fc..3b259f34f 100644 --- a/shell/android/src/com/reicast/emulator/GL2JNINative.java +++ b/shell/android/src/com/reicast/emulator/GL2JNINative.java @@ -246,13 +246,17 @@ public class GL2JNINative extends NativeActivity { } private void initJoyStickLayout(int playerNum) { - pad.globalLS_X[playerNum] = pad.previousLS_X[playerNum] = 0.0f; - pad.globalLS_Y[playerNum] = pad.previousLS_Y[playerNum] = 0.0f; + if (!pad.joystick[playerNum]) { + pad.globalLS_X[playerNum] = pad.previousLS_X[playerNum] = 0.0f; + pad.globalLS_Y[playerNum] = pad.previousLS_Y[playerNum] = 0.0f; + } } private void runCompatibilityMode(int joy) { for (int n = 0; n < 4; n++) { if (pad.compat[n]) { + String id = pad.portId[n]; + pad.joystick[n] = prefs.getBoolean(Gamepad.pref_js_separate + id, false); getCompatibilityMap(n, pad.portId[n]); pad.playerNumX.put(joy, n); initJoyStickLayout(n);