test/threadwin.c
changeset 4429 faa9fc8e7f67
parent 2117 40888832d785
child 5123 dc0dfdd58f27
     1.1 --- a/test/threadwin.c	Wed Mar 10 15:07:20 2010 +0000
     1.2 +++ b/test/threadwin.c	Thu Mar 25 01:08:26 2010 -0700
     1.3 @@ -133,14 +133,10 @@
     1.4  {
     1.5      SDL_Event events[10];
     1.6      int i, found;
     1.7 -    Uint32 mask;
     1.8  
     1.9      /* Handle mouse events here */
    1.10 -    mask =
    1.11 -        (SDL_MOUSEMOTIONMASK | SDL_MOUSEBUTTONDOWNMASK |
    1.12 -         SDL_MOUSEBUTTONUPMASK);
    1.13      while (!done) {
    1.14 -        found = SDL_PeepEvents(events, 10, SDL_GETEVENT, mask);
    1.15 +        found = SDL_PeepEvents(events, 10, SDL_GETEVENT, SDL_MOUSEMOTION, SDL_MOUSEBUTTONUP);
    1.16          for (i = 0; i < found; ++i) {
    1.17              switch (events[i].type) {
    1.18                  /* We want to toggle visibility on buttonpress */
    1.19 @@ -173,12 +169,10 @@
    1.20  {
    1.21      SDL_Event events[10];
    1.22      int i, found;
    1.23 -    Uint32 mask;
    1.24  
    1.25      /* Handle mouse events here */
    1.26 -    mask = (SDL_KEYDOWNMASK | SDL_KEYUPMASK);
    1.27      while (!done) {
    1.28 -        found = SDL_PeepEvents(events, 10, SDL_GETEVENT, mask);
    1.29 +        found = SDL_PeepEvents(events, 10, SDL_GETEVENT, SDL_KEYDOWN, SDL_KEYUP);
    1.30          for (i = 0; i < found; ++i) {
    1.31              switch (events[i].type) {
    1.32                  /* We want to toggle visibility on buttonpress */
    1.33 @@ -329,7 +323,7 @@
    1.34          if (!(init_flags & SDL_INIT_EVENTTHREAD)) {
    1.35              SDL_PumpEvents();   /* Needed when event thread is off */
    1.36          }
    1.37 -        if (SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, SDL_QUITMASK)) {
    1.38 +        if (SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, SDL_QUIT, SDL_QUIT)) {
    1.39              done = 1;
    1.40          }
    1.41          /* Give up some CPU so the events can accumulate */