Merge pull request #7622 from zackhow/ds4trig

Android: fix/ignore L2/R2 buttons
This commit is contained in:
Anthony 2019-01-07 13:47:16 -08:00 committed by GitHub
commit 3e7803b240
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -18,8 +18,7 @@ public class ControllerMappingHelper
{
// The two analog triggers generate analog motion events as well as a keycode.
// We always prefer to use the analog values, so throw away the button press
// Even though the triggers are L/R2, without mappings they generate L/R1 events.
return keyCode == KeyEvent.KEYCODE_BUTTON_L1 || keyCode == KeyEvent.KEYCODE_BUTTON_R1;
return keyCode == KeyEvent.KEYCODE_BUTTON_L2 || keyCode == KeyEvent.KEYCODE_BUTTON_R2;
}
return false;
}