Merge pull request #37261 from m6c7l/feature/issue-37239

Linux: add relaxation to conditions in the joystick check routine
This commit is contained in:
Rémi Verschelde 2020-03-24 11:17:54 +01:00 committed by GitHub
commit ebf21e2288
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,7 +340,10 @@ void JoypadLinux::open_joypad(const char *p_path) {
(test_bit(ABS_X, absbit) || test_bit(ABS_Y, absbit) || test_bit(ABS_HAT0X, absbit) ||
test_bit(ABS_GAS, absbit) || test_bit(ABS_RUDDER, absbit)) &&
(test_bit(BTN_A, keybit) || test_bit(BTN_THUMBL, keybit) ||
test_bit(BTN_TRIGGER, keybit) || test_bit(BTN_1, keybit)))) {
test_bit(BTN_TRIGGER, keybit) || test_bit(BTN_1, keybit))) &&
!(test_bit(EV_ABS, evbit) &&
test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit) &&
test_bit(ABS_RX, absbit) && test_bit(ABS_RY, absbit))) {
close(fd);
return;
}