Retain permissions, Lower RS sensitivity limit

This commit is contained in:
TwistedUmbrella 2014-07-29 20:22:37 -04:00
parent e7037fe638
commit dada5fb520
3 changed files with 10 additions and 8 deletions

View File

@ -9,7 +9,9 @@
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

View File

@ -282,10 +282,10 @@ public class GL2JNIActivity extends Activity {
GL2JNIView.rt[playerNum] = (int) (R2 * 255);
if (prefs.getBoolean("right_buttons", true)) {
if (RS_Y > 0.5) {
if (RS_Y > 0.25) {
handle_key(playerNum, pad.map[playerNum][0]/* A */, true);
pad.wasKeyStick[playerNum] = true;
} else if (RS_Y < 0.5) {
} else if (RS_Y < 0.25) {
handle_key(playerNum, pad.map[playerNum][1]/* B */, true);
pad.wasKeyStick[playerNum] = true;
} else if (pad.wasKeyStick[playerNum]){
@ -294,10 +294,10 @@ public class GL2JNIActivity extends Activity {
pad.wasKeyStick[playerNum] = false;
}
} else {
if (RS_Y > 0.5) {
if (RS_Y > 0.25) {
GL2JNIView.rt[playerNum] = (int) (RS_Y * 255);
GL2JNIView.lt[playerNum] = (int) (L2 * 255);
} else if (RS_Y < 0.5) {
} else if (RS_Y < 0.25) {
GL2JNIView.rt[playerNum] = (int) (R2 * 255);
GL2JNIView.lt[playerNum] = (int) (-(RS_Y) * 255);
}

View File

@ -372,10 +372,10 @@ public class GL2JNINative extends NativeActivity {
GL2JNIView.rt[playerNum] = (int) (R2 * 255);
if (prefs.getBoolean("right_buttons", true)) {
if (RS_Y > 0.5) {
if (RS_Y > 0.25) {
handle_key(playerNum, pad.map[playerNum][0]/* A */, true);
pad.wasKeyStick[playerNum] = true;
} else if (RS_Y < 0.5) {
} else if (RS_Y < 0.25) {
handle_key(playerNum, pad.map[playerNum][1]/* B */, true);
pad.wasKeyStick[playerNum] = true;
} else if (pad.wasKeyStick[playerNum]){
@ -384,10 +384,10 @@ public class GL2JNINative extends NativeActivity {
pad.wasKeyStick[playerNum] = false;
}
} else {
if (RS_Y > 0.5) {
if (RS_Y > 0.25) {
GL2JNIView.rt[playerNum] = (int) (RS_Y * 255);
GL2JNIView.lt[playerNum] = (int) (L2 * 255);
} else if (RS_Y < 0.5) {
} else if (RS_Y < 0.25) {
GL2JNIView.rt[playerNum] = (int) (R2 * 255);
GL2JNIView.lt[playerNum] = (int) (-(RS_Y) * 255);
}