@@ -78,6 +78,8 @@ QString serialize_uiohook(const uiohook_event *e, const std::string &source_name
7878 return " " ;
7979 }
8080 };
81+
82+ obj[" time" ] = double (e->time );
8183
8284 switch (e->type ) {
8385 case EVENT_KEY_TYPED:
@@ -89,7 +91,6 @@ QString serialize_uiohook(const uiohook_event *e, const std::string &source_name
8991 case EVENT_KEY_RELEASED:
9092 obj[" event_source" ] = utf8_to_qt (source_name.c_str ());
9193 obj[" event_type" ] = QString (ev_to_str (e->type ));
92- obj[" time" ] = int (e->time );
9394 obj[" mask" ] = e->mask ;
9495 obj[" keycode" ] = e->data .keyboard .keycode ;
9596 obj[" rawcode" ] = e->data .keyboard .rawcode ;
@@ -101,7 +102,6 @@ QString serialize_uiohook(const uiohook_event *e, const std::string &source_name
101102 case EVENT_MOUSE_DRAGGED:
102103 obj[" event_source" ] = utf8_to_qt (source_name.c_str ());
103104 obj[" event_type" ] = QString (ev_to_str (e->type ));
104- obj[" time" ] = int (e->time );
105105 obj[" mask" ] = e->mask ;
106106 obj[" button" ] = e->data .mouse .button ;
107107 obj[" clicks" ] = e->data .mouse .clicks ;
@@ -111,7 +111,6 @@ QString serialize_uiohook(const uiohook_event *e, const std::string &source_name
111111 case EVENT_MOUSE_WHEEL:
112112 obj[" event_source" ] = utf8_to_qt (source_name.c_str ());
113113 obj[" event_type" ] = QString (ev_to_str (e->type ));
114- obj[" time" ] = int (e->time );
115114 obj[" mask" ] = e->mask ;
116115 obj[" type" ] = e->data .wheel .type ;
117116 obj[" delta" ] = e->data .wheel .delta ;
@@ -141,7 +140,7 @@ void dispatch_sdl_event(const SDL_Event *e, const std::string &source_name, inpu
141140 QJsonObject obj;
142141 obj[" event_source" ] = source_name.c_str ();
143142 obj[" device_index" ] = (int )e->gdevice .which ;
144- obj[" time" ] = int (e->gdevice .timestamp );
143+ obj[" time" ] = double (e->gdevice .timestamp );
145144 double axis{};
146145 switch (e->type ) {
147146 case SDL_EVENT_GAMEPAD_ADDED:
0 commit comments