update logging of events in test core
authorEdward Rudd <urkle@outoforder.cc>
Sun, 23 Nov 2014 21:10:55 -0500
changeset 925895c3682d0b95
parent 9257 6f41196c2d6b
child 9259 3154de62258e
update logging of events in test core

- log unknown as HEX instead of int (makes it easier to identify)
- add dollar gesture and multi gesture events
- add scroll reverse for mouse wheel
src/test/SDL_test_common.c
     1.1 --- a/src/test/SDL_test_common.c	Sun Nov 23 21:09:54 2014 -0500
     1.2 +++ b/src/test/SDL_test_common.c	Sun Nov 23 21:10:55 2014 -0500
     1.3 @@ -1105,8 +1105,8 @@
     1.4                  event->button.windowID);
     1.5          break;
     1.6      case SDL_MOUSEWHEEL:
     1.7 -        SDL_Log("SDL EVENT: Mouse: wheel scrolled %d in x and %d in y in window %d",
     1.8 -                event->wheel.x, event->wheel.y, event->wheel.windowID);
     1.9 +        SDL_Log("SDL EVENT: Mouse: wheel scrolled %d in x and %d in y (reversed: %d) in window %d",
    1.10 +                event->wheel.x, event->wheel.y, event->wheel.reversed, event->wheel.windowID);
    1.11          break;
    1.12      case SDL_JOYDEVICEADDED:
    1.13          SDL_Log("SDL EVENT: Joystick index %d attached",
    1.14 @@ -1203,6 +1203,15 @@
    1.15                  event->tfinger.x, event->tfinger.y,
    1.16                  event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure);
    1.17          break;
    1.18 +    case SDL_DOLLARGESTURE:
    1.19 +        SDL_Log("SDL_EVENT: Dollar gesture detect: %lld", event->dgesture.gestureId);
    1.20 +        break;
    1.21 +    case SDL_DOLLARRECORD:
    1.22 +        SDL_Log("SDL_EVENT: Dollar gesture record: %lld", event->dgesture.gestureId);
    1.23 +        break;
    1.24 +    case SDL_MULTIGESTURE:
    1.25 +        SDL_Log("SDL_EVENT: Multi gesture fingers: %d", event->mgesture.numFingers);
    1.26 +        break;
    1.27  
    1.28      case SDL_RENDER_DEVICE_RESET:
    1.29          SDL_Log("SDL EVENT: render device reset");
    1.30 @@ -1218,7 +1227,7 @@
    1.31          SDL_Log("SDL EVENT: User event %d", event->user.code);
    1.32          break;
    1.33      default:
    1.34 -        SDL_Log("Unknown event %d", event->type);
    1.35 +        SDL_Log("Unknown event %04x", event->type);
    1.36          break;
    1.37      }
    1.38  }