test/testkeys.c
changeset 7639 9406b7dd2f2d
parent 7517 965d57022c01
child 8149 681eb46b8ac4
     1.1 --- a/test/testkeys.c	Mon Aug 12 22:00:21 2013 -0700
     1.2 +++ b/test/testkeys.c	Wed Aug 14 23:30:10 2013 -0700
     1.3 @@ -24,12 +24,15 @@
     1.4  {
     1.5      SDL_Scancode scancode;
     1.6  
     1.7 +    /* Enable standard application logging */
     1.8 +    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
     1.9 +
    1.10      if (SDL_Init(SDL_INIT_VIDEO) < 0) {
    1.11 -        fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    1.12 +        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
    1.13          exit(1);
    1.14      }
    1.15      for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) {
    1.16 -        printf("Scancode #%d, \"%s\"\n", scancode,
    1.17 +        SDL_Log("Scancode #%d, \"%s\"\n", scancode,
    1.18                 SDL_GetScancodeName(scancode));
    1.19      }
    1.20      SDL_Quit();