From bd4dd2b5689f5893ca565ca856eeb89d17b87da4 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Sun, 23 Nov 2014 21:10:55 -0500 Subject: [PATCH] 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 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c index d05dda47b..0eba6d5f4 100644 --- a/src/test/SDL_test_common.c +++ b/src/test/SDL_test_common.c @@ -1105,8 +1105,8 @@ SDLTest_PrintEvent(SDL_Event * event) event->button.windowID); break; case SDL_MOUSEWHEEL: - SDL_Log("SDL EVENT: Mouse: wheel scrolled %d in x and %d in y in window %d", - event->wheel.x, event->wheel.y, event->wheel.windowID); + SDL_Log("SDL EVENT: Mouse: wheel scrolled %d in x and %d in y (reversed: %d) in window %d", + event->wheel.x, event->wheel.y, event->wheel.reversed, event->wheel.windowID); break; case SDL_JOYDEVICEADDED: SDL_Log("SDL EVENT: Joystick index %d attached", @@ -1203,6 +1203,15 @@ SDLTest_PrintEvent(SDL_Event * event) event->tfinger.x, event->tfinger.y, event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure); break; + case SDL_DOLLARGESTURE: + SDL_Log("SDL_EVENT: Dollar gesture detect: %lld", event->dgesture.gestureId); + break; + case SDL_DOLLARRECORD: + SDL_Log("SDL_EVENT: Dollar gesture record: %lld", event->dgesture.gestureId); + break; + case SDL_MULTIGESTURE: + SDL_Log("SDL_EVENT: Multi gesture fingers: %d", event->mgesture.numFingers); + break; case SDL_RENDER_DEVICE_RESET: SDL_Log("SDL EVENT: render device reset"); @@ -1218,7 +1227,7 @@ SDLTest_PrintEvent(SDL_Event * event) SDL_Log("SDL EVENT: User event %d", event->user.code); break; default: - SDL_Log("Unknown event %d", event->type); + SDL_Log("Unknown event %04x", event->type); break; } }