From 15d9bc42ea14d1c1fd5d1f8787664bbf0944d0a3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 17 Mar 2007 00:53:21 +0000 Subject: Force all code to use EventManager::pollEvent instead of OSystem::pollEvent svn-id: r26156 --- engines/sword1/animation.cpp | 4 +++- engines/sword1/control.cpp | 4 +++- engines/sword1/credits.cpp | 4 +++- engines/sword1/sword1.cpp | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'engines/sword1') diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index b27bc15d0d..f8ed59a7a6 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -30,6 +30,7 @@ #include "common/config-manager.h" #include "common/endian.h" #include "common/str.h" +#include "common/events.h" #include "common/system.h" namespace Sword1 { @@ -193,13 +194,14 @@ void MoviePlayer::play(void) { } _currentFrame = 0; bool terminated = false; + Common::EventManager *eventMan = _sys->getEventManager(); while (!terminated && decodeFrame()) { processFrame(); syncFrame(); updateScreen(); _currentFrame++; OSystem::Event event; - while (_sys->pollEvent(event)) { + while (eventMan->pollEvent(event)) { switch (event.type) { case OSystem::EVENT_SCREEN_CHANGED: handleScreenChanged(); diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index d40c76eb89..9a4b2fe46a 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -24,6 +24,7 @@ #include "common/file.h" #include "common/util.h" #include "common/savefile.h" +#include "common/events.h" #include "common/system.h" #include "gui/message.h" @@ -1042,7 +1043,8 @@ void Control::delay(uint32 msecs) { _mouseState = 0; do { - while (_system->pollEvent(event)) { + Common::EventManager *eventMan = _system->getEventManager(); + while (eventMan->pollEvent(event)) { switch (event.type) { case OSystem::EVENT_KEYDOWN: diff --git a/engines/sword1/credits.cpp b/engines/sword1/credits.cpp index a8a4446d56..06539f986f 100644 --- a/engines/sword1/credits.cpp +++ b/engines/sword1/credits.cpp @@ -32,6 +32,7 @@ #include "common/file.h" #include "common/util.h" +#include "common/events.h" #include "common/system.h" @@ -274,7 +275,8 @@ void CreditsPlayer::delay(int msecs) { OSystem::Event event; uint32 start = _system->getMillis(); do { - while (_system->pollEvent(event)) { + Common::EventManager *eventMan = _system->getEventManager(); + while (eventMan->pollEvent(event)) { switch (event.type) { case OSystem::EVENT_QUIT: SwordEngine::_systemVars.engineQuit = true; diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index e830f7fd98..d9c689a769 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -28,6 +28,7 @@ #include "common/file.h" #include "common/fs.h" #include "common/timer.h" +#include "common/events.h" #include "common/system.h" #include "sword1/resman.h" @@ -705,7 +706,8 @@ void SwordEngine::delay(int32 amount) { //copied and mutilated from sky.cpp uint32 start = _system->getMillis(); do { - while (_system->pollEvent(event)) { + Common::EventManager *eventMan = _system->getEventManager(); + while (eventMan->pollEvent(event)) { switch (event.type) { case OSystem::EVENT_KEYDOWN: // Make sure backspace works right (this fixes a small issue on OS X) -- cgit v1.2.3