WM: include previous value, type in event printing
authorCampbell Barton <ideasman42@gmail.com>
Thu, 14 May 2020 07:59:14 +0000 (17:59 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 14 May 2020 07:59:14 +0000 (17:59 +1000)
source/blender/windowmanager/intern/wm_event_query.c

index 5b1c7680adce14b3524b2847d506d4c21aaa5c4a..381c06983a858987c1e2ddf9bd3ac0db4dd0fe41 100644 (file)
@@ -61,18 +61,28 @@ void WM_event_print(const wmEvent *event)
     const char *unknown = "UNKNOWN";
     const char *type_id = unknown;
     const char *val_id = unknown;
+    const char *prev_type_id = unknown;
+    const char *prev_val_id = unknown;
 
     RNA_enum_identifier(rna_enum_event_type_items, event->type, &type_id);
     RNA_enum_identifier(rna_enum_event_value_items, event->val, &val_id);
 
+    RNA_enum_identifier(rna_enum_event_type_items, event->prevtype, &prev_type_id);
+    RNA_enum_identifier(rna_enum_event_value_items, event->prevval, &prev_val_id);
+
     printf(
         "wmEvent  type:%d / %s, val:%d / %s,\n"
+        "         prev_type:%d / %s, prev_val:%d / %s,\n"
         "         shift:%d, ctrl:%d, alt:%d, oskey:%d, keymodifier:%d, is_repeat:%d,\n"
         "         mouse:(%d,%d), ascii:'%c', utf8:'%.*s', pointer:%p\n",
         event->type,
         type_id,
         event->val,
         val_id,
+        event->prevtype,
+        prev_type_id,
+        event->prevval,
+        prev_val_id,
         event->shift,
         event->ctrl,
         event->alt,