aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/titanic.cpp13
-rw-r--r--engines/titanic/titanic.h5
2 files changed, 18 insertions, 0 deletions
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index bcccf1b880..b00e1c3088 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -87,7 +87,20 @@ void TitanicEngine::deinitialize() {
Common::Error TitanicEngine::run() {
initialize();
+ // Main event loop
+ while (!shouldQuit()) {
+ processEvents();
+ g_system->delayMillis(5);
+ }
+
+ deinitialize();
return Common::kNoError;
}
+void TitanicEngine::processEvents() {
+ Common::Event evt;
+ g_system->getEventManager()->pollEvent(evt);
+
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h
index 978f9b3d4f..ad0ed75165 100644
--- a/engines/titanic/titanic.h
+++ b/engines/titanic/titanic.h
@@ -80,6 +80,11 @@ private:
* Handles game deinitialization
*/
void deinitialize();
+
+ /**
+ * Processes pending events
+ */
+ void processEvents();
protected:
const TitanicGameDescription *_gameDescription;
int _loadSaveSlot;