Include dpad buttons in joystick detection (#6240)
Since f472d466ec ("Remove BTN_DPAD_* keys from ID_INPUT_KEY test
(#5701)") dpad buttons are excluded from keyboard keys for keyboard
detection.
Include them in joystick buttons for joystick detection.
This commit is contained in:
@@ -211,6 +211,8 @@ static bool test_pointers(struct udev_device *dev,
|
|||||||
has_joystick_axes_or_buttons = test_bit(button, bitmask_key);
|
has_joystick_axes_or_buttons = test_bit(button, bitmask_key);
|
||||||
for (button = BTN_TRIGGER_HAPPY1; button <= BTN_TRIGGER_HAPPY40 && !has_joystick_axes_or_buttons; button++)
|
for (button = BTN_TRIGGER_HAPPY1; button <= BTN_TRIGGER_HAPPY40 && !has_joystick_axes_or_buttons; button++)
|
||||||
has_joystick_axes_or_buttons = test_bit(button, bitmask_key);
|
has_joystick_axes_or_buttons = test_bit(button, bitmask_key);
|
||||||
|
for (button = BTN_DPAD_UP; button <= BTN_DPAD_RIGHT && !has_joystick_axes_or_buttons; button++)
|
||||||
|
has_joystick_axes_or_buttons = test_bit(button, bitmask_key);
|
||||||
for (axis = ABS_RX; axis < ABS_PRESSURE && !has_joystick_axes_or_buttons; axis++)
|
for (axis = ABS_RX; axis < ABS_PRESSURE && !has_joystick_axes_or_buttons; axis++)
|
||||||
has_joystick_axes_or_buttons = test_bit(axis, bitmask_abs);
|
has_joystick_axes_or_buttons = test_bit(axis, bitmask_abs);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user