Search
lxdream.org :: lxdream :: r634:b7d5592495e9
lxdream 0.9.1
released Jun 29
Download Now
changeset634:b7d5592495e9
parent633:bbfc1a38ddb5
child637:6a284eff5311
authornkeynes
dateWed Feb 13 09:16:29 2008 +0000 (11 years ago)
Mouse button sense was inverted - fixed
src/maple/mouse.c
1.1 --- a/src/maple/mouse.c Tue Feb 12 21:05:34 2008 +0000
1.2 +++ b/src/maple/mouse.c Wed Feb 13 09:16:29 2008 +0000
1.3 @@ -85,18 +85,18 @@
1.4 void mouse_input_callback( void *mdev, uint32_t buttons, int32_t x, int32_t y )
1.5 {
1.6 mouse_device_t dev = (mouse_device_t)mdev;
1.7 - dev->buttons = 0;
1.8 + dev->buttons = 0xFF;
1.9 if( buttons & 0x01 ) {
1.10 - dev->buttons |= BUTTON_LEFT;
1.11 + dev->buttons &= ~BUTTON_LEFT;
1.12 }
1.13 if( buttons & 0x02 ) {
1.14 - dev->buttons |= BUTTON_MIDDLE;
1.15 + dev->buttons &= ~BUTTON_MIDDLE;
1.16 }
1.17 if( buttons & 0x04 ) {
1.18 - dev->buttons |= BUTTON_RIGHT;
1.19 + dev->buttons &= ~BUTTON_RIGHT;
1.20 }
1.21 if( buttons & 0x08 ) {
1.22 - dev->buttons |= BUTTON_THUMB;
1.23 + dev->buttons &= ~BUTTON_THUMB;
1.24 }
1.25 dev->axis[0] += x;
1.26 dev->axis[1] += y;
.