diff options
author | D G Turner | 2019-07-24 22:04:37 +0100 |
---|---|---|
committer | D G Turner | 2019-07-24 22:04:37 +0100 |
commit | 76ec4b8d82b8bcefd752e221fe5f9e2184d1c643 (patch) | |
tree | d4236ddc53b2e1f8ab6b6928344d9d891130ab52 /engines/cge2 | |
parent | 2d1b4dc9778856ad981b0d4cd49416e973ba5b9c (diff) | |
download | scummvm-rg350-76ec4b8d82b8bcefd752e221fe5f9e2184d1c643.tar.gz scummvm-rg350-76ec4b8d82b8bcefd752e221fe5f9e2184d1c643.tar.bz2 scummvm-rg350-76ec4b8d82b8bcefd752e221fe5f9e2184d1c643.zip |
CGE2: Fix GCC Warnings by Explicit Structure Initialization
This is as per the changes to the CGE engine.
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/events.cpp | 11 |
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() { |