Make sure the visual buttons are available to "press" them

This commit is contained in:
TwistedUmbrella 2014-01-27 02:00:42 -05:00
parent aa470c7348
commit 02e5cd3ee2
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;