Use SDL's internal x, y for mouse button events - fixes relative motion bug.
authorSam Lantinga <slouken@libsdl.org>
Wed, 23 Jul 2003 05:30:08 +0000
changeset 658e71b7108d2d7
parent 657 714053f573e7
child 659 e3d0517bf67e
Use SDL's internal x, y for mouse button events - fixes relative motion bug.
src/video/riscos/SDL_riscosevents.c
     1.1 --- a/src/video/riscos/SDL_riscosevents.c	Wed Jul 23 04:39:44 2003 +0000
     1.2 +++ b/src/video/riscos/SDL_riscosevents.c	Wed Jul 23 05:30:08 2003 +0000
     1.3 @@ -336,9 +336,9 @@
     1.4            {
     1.5               int changed = last_buttons ^ regs.r[2];
     1.6               last_buttons = regs.r[2];
     1.7 -             if (changed & 4) SDL_PrivateMouseButton((last_buttons & 4) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_LEFT, x, y);
     1.8 -             if (changed & 2) SDL_PrivateMouseButton((last_buttons & 2) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_MIDDLE, x, y);
     1.9 -             if (changed & 1) SDL_PrivateMouseButton((last_buttons & 1) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_RIGHT, x, y);
    1.10 +             if (changed & 4) SDL_PrivateMouseButton((last_buttons & 4) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_LEFT, 0, 0);
    1.11 +             if (changed & 2) SDL_PrivateMouseButton((last_buttons & 2) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_MIDDLE, 0, 0);
    1.12 +             if (changed & 1) SDL_PrivateMouseButton((last_buttons & 1) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_RIGHT, 0, 0);
    1.13            }
    1.14         }
    1.15      }