Skip to content

Commit

Permalink
Input: Fix button mapping in joydev - BTN_TRIGGER was being
Browse files Browse the repository at this point in the history
       mapped twice, resulting in it being the last (instead
       of first) button on a joystick.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Vojtech Pavlik authored and Dmitry Torokhov committed May 28, 2005
1 parent 7741e93 commit f24949e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/joydev.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
joydev->nkey++;
}

for (i = 0; i < BTN_JOYSTICK - BTN_MISC + 1; i++)
for (i = 0; i < BTN_JOYSTICK - BTN_MISC; i++)
if (test_bit(i + BTN_MISC, dev->keybit)) {
joydev->keymap[i] = joydev->nkey;
joydev->keypam[joydev->nkey] = i + BTN_MISC;
Expand Down

0 comments on commit f24949e

Please sign in to comment.