patch-2.3.99-pre2 linux/drivers/usb/joydev.c
Next file: linux/drivers/usb/serial/Makefile
Previous file: linux/drivers/usb/hub.h
Back to the patch index
Back to the overall index
- Lines: 11
- Date:
Fri Mar 17 14:19:33 2000
- Orig file:
v2.3.99-pre1/linux/drivers/usb/joydev.c
- Orig date:
Thu Mar 2 14:36:23 2000
diff -u --recursive --new-file v2.3.99-pre1/linux/drivers/usb/joydev.c linux/drivers/usb/joydev.c
@@ -224,8 +224,8 @@
struct JS_DATA_TYPE data;
- data.buttons = (joydev->nkey > 0 && test_bit(joydev->keypam[0], input->key)) ? 1 : 0 |
- (joydev->nkey > 1 && test_bit(joydev->keypam[1], input->key)) ? 2 : 0;
+ data.buttons = ((joydev->nkey > 0 && test_bit(joydev->keypam[0], input->key)) ? 1 : 0) |
+ ((joydev->nkey > 1 && test_bit(joydev->keypam[1], input->key)) ? 2 : 0);
data.x = ((joydev_correct(input->abs[ABS_X], &joydev->corr[0]) / 256) + 128) >> joydev->glue.JS_CORR.x;
data.y = ((joydev_correct(input->abs[ABS_Y], &joydev->corr[1]) / 256) + 128) >> joydev->glue.JS_CORR.y;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)