aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/cge2/events.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/cge2/events.cpp b/engines/cge2/events.cpp
index b5c452745b..3493363d42 100644
--- a/engines/cge2/events.cpp
+++ b/engines/cge2/events.cpp
@@ -207,8 +207,15 @@ void Mouse::newMouse(Common::Event &event) {
EventManager::EventManager(CGE2Engine *vm) : _vm(vm) {
_eventQueueHead = 0;
_eventQueueTail = 0;
- memset(&_eventQueue, 0, kEventMax * sizeof(CGE2Event));
- memset(&_event, 0, sizeof(Common::Event));
+ for (uint16 k = 0; k < kEventMax; k++) {
+ _eventQueue[k]._mask = 0;
+ _eventQueue[k]._x = 0;
+ _eventQueue[k]._y = 0;
+ _eventQueue[k]._spritePtr = nullptr;
+ }
+ _event.joystick.axis = 0;
+ _event.joystick.position = 0;
+ _event.joystick.button = 0;
}
void EventManager::poll() {