Added test debug logs for additional event types
authorSam Lantinga
Sat, 12 Aug 2017 20:21:34 -0700
changeset 112577561c9adebd4
parent 11256 49fe11ad0425
child 11258 9fc2e83124ba
Added test debug logs for additional event types
src/test/SDL_test_common.c
     1.1 --- a/src/test/SDL_test_common.c	Sat Aug 12 22:16:04 2017 -0300
     1.2 +++ b/src/test/SDL_test_common.c	Sat Aug 12 20:21:34 2017 -0700
     1.3 @@ -1077,7 +1077,7 @@
     1.4              SDL_Log("SDL EVENT: Window %d hit test", event->window.windowID);
     1.5              break;
     1.6          default:
     1.7 -            SDL_Log("SDL EVENT: Window %d got unknown event %d",
     1.8 +            SDL_Log("SDL EVENT: Window %d got unknown event 0x%4.4x",
     1.9                      event->window.windowID, event->window.event);
    1.10              break;
    1.11          }
    1.12 @@ -1206,6 +1206,13 @@
    1.13          SDL_Log("SDL EVENT: Clipboard updated");
    1.14          break;
    1.15  
    1.16 +    case SDL_FINGERMOTION:
    1.17 +        SDL_Log("SDL EVENT: Finger: motion touch=%ld, finger=%ld, x=%f, y=%f, dx=%f, dy=%f, pressure=%f",
    1.18 +                (long) event->tfinger.touchId,
    1.19 +                (long) event->tfinger.fingerId,
    1.20 +                event->tfinger.x, event->tfinger.y,
    1.21 +                event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure);
    1.22 +        break;
    1.23      case SDL_FINGERDOWN:
    1.24      case SDL_FINGERUP:
    1.25          SDL_Log("SDL EVENT: Finger: %s touch=%ld, finger=%ld, x=%f, y=%f, dx=%f, dy=%f, pressure=%f",
    1.26 @@ -1232,6 +1239,25 @@
    1.27          SDL_Log("SDL EVENT: render targets reset");
    1.28          break;
    1.29  
    1.30 +    case SDL_APP_TERMINATING:
    1.31 +        SDL_Log("SDL EVENT: App terminating");
    1.32 +        break;
    1.33 +    case SDL_APP_LOWMEMORY:
    1.34 +        SDL_Log("SDL EVENT: App running low on memory");
    1.35 +        break;
    1.36 +    case SDL_APP_WILLENTERBACKGROUND:
    1.37 +        SDL_Log("SDL EVENT: App will enter the background");
    1.38 +        break;
    1.39 +    case SDL_APP_DIDENTERBACKGROUND:
    1.40 +        SDL_Log("SDL EVENT: App entered the background");
    1.41 +        break;
    1.42 +    case SDL_APP_WILLENTERFOREGROUND:
    1.43 +        SDL_Log("SDL EVENT: App will enter the foreground");
    1.44 +        break;
    1.45 +    case SDL_APP_DIDENTERFOREGROUND:
    1.46 +        SDL_Log("SDL EVENT: App entered the foreground");
    1.47 +        break;
    1.48 +
    1.49      case SDL_QUIT:
    1.50          SDL_Log("SDL EVENT: Quit requested");
    1.51          break;
    1.52 @@ -1239,7 +1265,7 @@
    1.53          SDL_Log("SDL EVENT: User event %d", event->user.code);
    1.54          break;
    1.55      default:
    1.56 -        SDL_Log("Unknown event %04x", event->type);
    1.57 +        SDL_Log("Unknown event 0x%4.4x", event->type);
    1.58          break;
    1.59      }
    1.60  }