Changeset 648


Ignore:
Timestamp:
May 13, 2011, 5:42:43 PM (9 years ago)
Author:
Sam Hocevar
Message:

imlib: disable the mouse polling behaviour, it's unused.

Location:
abuse/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/mouse.h

    r645 r648  
    2222
    2323    void set_shape(image *im, int centerx = 0, int centery = 0);
    24     void update(int newx = -1, int newy = -1, int new_but = -1);
     24    void update(int newx, int newy, int new_but);
    2525    void set_shape(image *im) { if (here) sp->change_visual(im); }
    2626    sprite *mouse_sprite() { return sp; }
  • abuse/trunk/src/sdlport/mouse.cpp

    r646 r648  
    111111void JCMouse::update(int newx, int newy, int new_but)
    112112{
    113     if (newx < 0)
    114     {
    115         lx = mx;
    116         ly = my;
    117         lbut = but;
    118 
    119         uint8_t mask = SDL_GetMouseState(&mx, &my);
    120         but = ((mask & SDL_BUTTON(1)) != 0) |
    121               ((mask & SDL_BUTTON(2)) != 0) << 2 |
    122               ((mask & SDL_BUTTON(3)) != 0) << 1;
    123     }
    124     else
    125     {
    126         mx = newx;
    127         my = newy;
    128         but = new_but;
    129     }
     113    mx = newx;
     114    my = newy;
     115    but = new_but;
    130116}
    131117
Note: See TracChangeset for help on using the changeset viewer.