test/testhittesting.c
changeset 8939 caaa7653f02b
parent 8936 59cbb9959346
child 8940 850e149d02d8
     1.1 --- a/test/testhittesting.c	Thu May 29 13:39:02 2014 -0400
     1.2 +++ b/test/testhittesting.c	Fri May 30 01:48:08 2014 -0400
     1.3 @@ -18,12 +18,12 @@
     1.4      int i;
     1.5      for (i = 0; i < numareas; i++) {
     1.6          if (SDL_PointInRect(pt, &areas[i])) {
     1.7 -            printf("HIT-TEST: DRAGGABLE\n");
     1.8 +            SDL_Log("HIT-TEST: DRAGGABLE\n");
     1.9              return SDL_HITTEST_DRAGGABLE;
    1.10          }
    1.11      }
    1.12  
    1.13 -    printf("HIT-TEST: NORMAL\n");
    1.14 +    SDL_Log("HIT-TEST: NORMAL\n");
    1.15      return SDL_HITTEST_NORMAL;
    1.16  }
    1.17  
    1.18 @@ -40,7 +40,7 @@
    1.19      renderer = SDL_CreateRenderer(window, -1, 0);
    1.20  
    1.21      if (SDL_SetWindowHitTest(window, hitTest, NULL) == -1) {
    1.22 -        fprintf(stderr, "Enabling hit-testing failed!\n");
    1.23 +        SDL_Log("Enabling hit-testing failed!\n");
    1.24          SDL_Quit();
    1.25          return 1;
    1.26      }
    1.27 @@ -61,16 +61,16 @@
    1.28              switch (e.type)
    1.29              {
    1.30                  case SDL_MOUSEBUTTONDOWN:
    1.31 -                    printf("button down!\n");
    1.32 +                    SDL_Log("button down!\n");
    1.33                      break;
    1.34  
    1.35                  case SDL_MOUSEBUTTONUP:
    1.36 -                    printf("button up!\n");
    1.37 +                    SDL_Log("button up!\n");
    1.38                      break;
    1.39  
    1.40                  case SDL_WINDOWEVENT:
    1.41                      if (e.window.event == SDL_WINDOWEVENT_MOVED) {
    1.42 -                        printf("Window event moved to (%d, %d)!\n", (int) e.window.data1, (int) e.window.data2);
    1.43 +                        SDL_Log("Window event moved to (%d, %d)!\n", (int) e.window.data1, (int) e.window.data2);
    1.44                      }
    1.45                      break;
    1.46