diff options
-rw-r--r-- | common/recorderfile.h | 10 | ||||
-rw-r--r-- | gui/EventRecorder.cpp | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/common/recorderfile.h b/common/recorderfile.h index d34a442604..b1001628b8 100644 --- a/common/recorderfile.h +++ b/common/recorderfile.h @@ -44,6 +44,16 @@ enum RecorderEventType { struct RecorderEvent : Event { RecorderEventType recordedtype; uint32 time; + + RecorderEvent() { + recordedtype = kRecorderEventTypeNormal; + time = 0; + } + + RecorderEvent(const Event &e) : Event(e) { + recordedtype = kRecorderEventTypeNormal; + time = 0; + } }; diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp index 560df0ec35..d249ea4eff 100644 --- a/gui/EventRecorder.cpp +++ b/gui/EventRecorder.cpp @@ -455,8 +455,7 @@ Common::List<Common::Event> EventRecorder::mapEvent(const Common::Event &ev, Com if (((evt.type == Common::EVENT_LBUTTONDOWN) || (evt.type == Common::EVENT_LBUTTONUP) || (evt.type == Common::EVENT_MOUSEMOVE)) && _controlPanel->isMouseOver()) { return Common::List<Common::Event>(); } else { - Common::RecorderEvent e; - memcpy(&e, &ev, sizeof(ev)); + Common::RecorderEvent e(ev); e.recordedtype = Common::kRecorderEventTypeNormal; e.time = _fakeTimer; _playbackFile->writeEvent(e); |