Fixed bug 1032 SDL-1.2
authorSam Lantinga
Thu, 29 Dec 2011 04:24:15 -0500
branchSDL-1.2
changeset 6109469e95e71627
parent 6099 c5d651a8b679
child 6110 676a54593bc4
Fixed bug 1032

Matthias Hawran 2010-07-28 03:00:49 PDT
Hi,

I simply want to "forward" this post
(http://forums.libsdl.org/viewtopic.php?t=4123) about absolute mouse events not
being monitored by SDL 1.2 as directfb / tslib generates them.

It's fixed in 1.3 and IMHO it should be backported to 1.2

Included the patch from the post (thanks to Guillaume Chereau)

Cheers,
Matthias
src/video/directfb/SDL_DirectFB_events.c
     1.1 --- a/src/video/directfb/SDL_DirectFB_events.c	Fri Dec 02 18:35:04 2011 -0500
     1.2 +++ b/src/video/directfb/SDL_DirectFB_events.c	Thu Dec 29 04:24:15 2011 -0500
     1.3 @@ -79,6 +79,15 @@
     1.4                else if (evt.axis == DIAI_Y)
     1.5                  posted += SDL_PrivateMouseMotion(0, 1, 0, evt.axisrel);
     1.6              }
     1.7 +          else if (evt.flags & DIEF_AXISABS)
     1.8 +            {
     1.9 +              static int last_x, last_y;
    1.10 +              if (evt.axis == DIAI_X)
    1.11 +                last_x = evt.axisabs;
    1.12 +              else if (evt.axis == DIAI_Y)
    1.13 +                last_y = evt.axisabs;
    1.14 +              posted += SDL_PrivateMouseMotion(0, 0, last_x, last_y);
    1.15 +            }
    1.16            break;
    1.17          default:
    1.18            ;