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
This commit is contained in:
Christopher Page 2008-07-07 22:34:45 +00:00
parent b50df858eb
commit a4f56de13a
13 changed files with 66 additions and 52 deletions

View file

@ -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;