update logging of events in test core
authorEdward Rudd <urkle@outoforder.cc>
Sun, 23 Nov 2014 21:10:55 -0500
changeset 9258 95c3682d0b95
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
--- a/src/test/SDL_test_common.c	Sun Nov 23 21:09:54 2014 -0500
+++ b/src/test/SDL_test_common.c	Sun Nov 23 21:10:55 2014 -0500
@@ -1105,8 +1105,8 @@
                 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 @@
                 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 @@
         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;
     }
 }