diff options
author | punto- <ariel@godotengine.org> | 2016-02-07 00:49:54 -0300 |
---|---|---|
committer | punto- <ariel@godotengine.org> | 2016-02-07 00:49:54 -0300 |
commit | 63fc7ef79805cb51552cdd39d83acad5cffd3394 (patch) | |
tree | bd52c7c3cc023d553db7fa89dd830416bfa86715 | |
parent | 4a39202c8d162d1e8b7d389fdcb75b51323d2d7d (diff) | |
parent | fef92c0fabf68829a2c4a69f27e5db3987e25ab2 (diff) |
Merge pull request #3615 from Hinsbart/joy_check_fix
x11: more verbose checking for joystick capabilities
-rw-r--r-- | platform/x11/joystick_linux.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/x11/joystick_linux.cpp b/platform/x11/joystick_linux.cpp index 1a11876d5d..ef866d5d3a 100644 --- a/platform/x11/joystick_linux.cpp +++ b/platform/x11/joystick_linux.cpp @@ -312,8 +312,10 @@ void joystick_linux::open_joystick(const char *p_path) { //check if the device supports basic gamepad events, prevents certain keyboards from //being detected as joysticks if (!(test_bit(EV_KEY, evbit) && test_bit(EV_ABS, evbit) && - ((test_bit(ABS_X, absbit) || test_bit(ABS_Y, absbit) || test_bit(ABS_HAT0X, absbit)) && - (test_bit(BTN_A, keybit) || test_bit(BTN_THUMBL, keybit))))) { + (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)))) { close(fd); return; } |