aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorChristopher Page2008-07-07 22:34:45 +0000
committerChristopher Page2008-07-07 22:34:45 +0000
commita4f56de13ac2a7daaf5654c75f07ad6331f375e6 (patch)
tree8a000a805fef0d628eaeb9d662daf0649a785ffe /base
parentb50df858eb52520b529597d98fcd0d9b29619930 (diff)
downloadscummvm-rg350-a4f56de13ac2a7daaf5654c75f07ad6331f375e6.tar.gz
scummvm-rg350-a4f56de13ac2a7daaf5654c75f07ad6331f375e6.tar.bz2
scummvm-rg350-a4f56de13ac2a7daaf5654c75f07ad6331f375e6.zip
Implemented Common::EventManager::pushEvent() to insert fake events into the event queue. Quit and RTL events have been added, and are now tracked by the DefaultEventManager using shouldQuit() and shouldRTL(). AGOS is working with this new implementation, other engines to follow.
svn-id: r32952
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/main.cpp b/base/main.cpp
index b4b075a415..b836b423a4 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -38,6 +38,7 @@
#include "base/version.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "common/file.h"
#include "common/fs.h"
#include "common/system.h"
@@ -315,6 +316,11 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
// TODO: We should keep running if starting the selected game failed
// (so instead of just quitting, show a nice error dialog to the
// user and let him pick another game).
+
+ // Reset RTL and Quit flags in case we want to load another engine
+ g_system->getEventManager()->resetRTL();
+ g_system->getEventManager()->resetQuit();
+
if (result == 0)
break;