test/testwm2.c
changeset 7639 9406b7dd2f2d
parent 7517 965d57022c01
child 7663 53fe1b64eb2d
     1.1 --- a/test/testwm2.c	Mon Aug 12 22:00:21 2013 -0700
     1.2 +++ b/test/testwm2.c	Wed Aug 14 23:30:10 2013 -0700
     1.3 @@ -48,6 +48,9 @@
     1.4      int system_cursor = -1;
     1.5      SDL_Cursor *cursor = NULL;
     1.6  
     1.7 +	/* Enable standard application logging */
     1.8 +    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
     1.9 +
    1.10      SDL_assert(SDL_arraysize(cursorNames) == SDL_NUM_SYSTEM_CURSORS);
    1.11  
    1.12      /* Initialize test framework */
    1.13 @@ -64,7 +67,7 @@
    1.14              consumed = -1;
    1.15          }
    1.16          if (consumed < 0) {
    1.17 -            fprintf(stderr, "Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
    1.18 +            SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
    1.19              quit(1);
    1.20          }
    1.21          i += consumed;
    1.22 @@ -84,7 +87,7 @@
    1.23                  if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
    1.24                      SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
    1.25                      if (window) {
    1.26 -                        printf("Window %d resized to %dx%d\n",
    1.27 +                        SDL_Log("Window %d resized to %dx%d\n",
    1.28                              event.window.windowID,
    1.29                              event.window.data1,
    1.30                              event.window.data2);
    1.31 @@ -93,7 +96,7 @@
    1.32                  if (event.window.event == SDL_WINDOWEVENT_MOVED) {
    1.33                      SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
    1.34                      if (window) {
    1.35 -                        printf("Window %d moved to %d,%d (display %s)\n",
    1.36 +                        SDL_Log("Window %d moved to %d,%d (display %s)\n",
    1.37                              event.window.windowID,
    1.38                              event.window.data1,
    1.39                              event.window.data2,