diff options
Diffstat (limited to 'engines/titanic/events.cpp')
-rw-r--r-- | engines/titanic/events.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/titanic/events.cpp b/engines/titanic/events.cpp index f554796d09..f946f7b214 100644 --- a/engines/titanic/events.cpp +++ b/engines/titanic/events.cpp @@ -27,6 +27,7 @@ #include "titanic/events.h" #include "titanic/titanic.h" #include "titanic/main_game_window.h" +#include "titanic/star_control/star_control.h" namespace Titanic { @@ -108,10 +109,22 @@ void Events::pollEventsAndWait() { pollEvents(); g_system->delayMillis(10); - // Regularly update the sound mixer CGameManager *gameManager = g_vm->_window->_gameManager; - if (gameManager) + if (gameManager) { + // Regularly update the sound mixer gameManager->_sound.updateMixer(); + + // WORKAROUND: If in the Star Control view, update the camera + // frequently, to accomodate that the original had a higher + // draw rate than the ScummVM implementation does + CViewItem *view = gameManager->getView(); + if (view->getFullViewName() == "Bridge.Node 4.N") { + CStarControl *starControl = dynamic_cast<CStarControl *>( + view->findChildInstanceOf(CStarControl::_type)); + if (starControl && starControl->_visible) + starControl->updateCamera(); + } + } } bool Events::checkForNextFrameCounter() { |