diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-03-24 11:17:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 11:17:54 +0100 |
commit | ebf21e2288ae8345dae4822aec7d79225112ea25 (patch) | |
tree | 4de8c2fcb4c9028e3573c1e951970e5f515000f3 /platform | |
parent | 985cae95fa1e916e4342e5c2338fb348895de52d (diff) | |
parent | 36293f4256931d4693befb033880823eb4c0426e (diff) |
Merge pull request #37261 from m6c7l/feature/issue-37239
Linux: add relaxation to conditions in the joystick check routine
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/joypad_linux.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp index a9fe7275c2..1aacc6a250 100644 --- a/platform/x11/joypad_linux.cpp +++ b/platform/x11/joypad_linux.cpp @@ -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; } |