Search
lxdream.org :: lxdream/src/maple/mouse.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/maple/mouse.c
changeset 634:b7d5592495e9
prev611:0c5f53a87501
next669:ab344e42bca9
author nkeynes
date Wed Feb 13 09:16:29 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Mouse button sense was inverted - fixed
file annotate diff log raw
1.1 --- a/src/maple/mouse.c Sat Jan 26 03:44:22 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;
.