test/testintersections.c
changeset 4465 3e69e077cb95
parent 3685 64ce267332c6
child 5140 e743b9c3f6d6
     1.1 --- a/test/testintersections.c	Sun May 09 19:55:28 2010 -0700
     1.2 +++ b/test/testintersections.c	Sun May 09 20:47:22 2010 -0700
     1.3 @@ -288,20 +288,16 @@
     1.4              CommonEvent(state, &event, &done);
     1.5              switch (event.type) {
     1.6              case SDL_MOUSEBUTTONDOWN:
     1.7 -                if (event.button.which == 0) {
     1.8 -                    mouse_begin_x = event.button.x;
     1.9 -                    mouse_begin_y = event.button.y;
    1.10 -                }
    1.11 +                mouse_begin_x = event.button.x;
    1.12 +                mouse_begin_y = event.button.y;
    1.13                  break;
    1.14              case SDL_MOUSEBUTTONUP:
    1.15 -                if (event.button.which == 0) {
    1.16 -                    if (event.button.button == 3)
    1.17 -                        add_line(mouse_begin_x, mouse_begin_y, event.button.x,
    1.18 -                                 event.button.y);
    1.19 -                    if (event.button.button == 1)
    1.20 -                        add_rect(mouse_begin_x, mouse_begin_y, event.button.x,
    1.21 -                                 event.button.y);
    1.22 -                }
    1.23 +                if (event.button.button == 3)
    1.24 +                    add_line(mouse_begin_x, mouse_begin_y, event.button.x,
    1.25 +                             event.button.y);
    1.26 +                if (event.button.button == 1)
    1.27 +                    add_rect(mouse_begin_x, mouse_begin_y, event.button.x,
    1.28 +                             event.button.y);
    1.29                  break;
    1.30              case SDL_KEYDOWN:
    1.31                  switch (event.key.keysym.sym) {