From cd22816c1b12efd6d117b129f8525ed964b898ef Mon Sep 17 00:00:00 2001 From: Ender's Games Date: Sat, 18 Aug 2018 15:28:41 -0400 Subject: [PATCH] Android: prevent auxilliary from overriding hardware --- .../src/main/java/com/reicast/emulator/GL2JNIActivity.java | 2 +- .../src/main/java/com/reicast/emulator/GL2JNINative.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 f8bbc3ab1..367f2f604 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 @@ -270,7 +270,7 @@ public class GL2JNIActivity extends Activity { handle_key(playerNum, pad.map[playerNum][1], false); pad.wasKeyStick[playerNum] = false; } - } else { + } else if (L2 == 0 && R2 ==0) { if (RS_Y > 0.25) { GL2JNIView.rt[playerNum] = (int) (RS_Y * 255); GL2JNIView.lt[playerNum] = (int) (L2 * 255); 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 5823435f2..160750d87 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 @@ -332,7 +332,7 @@ public class GL2JNINative extends NativeActivity { handle_key(playerNum, pad.map[playerNum][1], false); pad.wasKeyStick[playerNum] = false; } - } else { + } else if (L2 == 0 && R2 ==0) { if (RS_Y > 0.25) { GL2JNIView.rt[playerNum] = (int) (RS_Y * 255); GL2JNIView.lt[playerNum] = (int) (L2 * 255);