aboutsummaryrefslogtreecommitdiff
path: root/backends/events/default
diff options
context:
space:
mode:
authorChristopher Page2008-07-13 20:41:39 +0000
committerChristopher Page2008-07-13 20:41:39 +0000
commita6e1d6bd3dcdc1fae7832ffe26b4d774ec1fe6a3 (patch)
tree612ea0f89559780287b05b6cb122f681c290689d /backends/events/default
parente9c6b03fc73ad5d556eb56afed6e55ef1b0bef67 (diff)
downloadscummvm-rg350-a6e1d6bd3dcdc1fae7832ffe26b4d774ec1fe6a3.tar.gz
scummvm-rg350-a6e1d6bd3dcdc1fae7832ffe26b4d774ec1fe6a3.tar.bz2
scummvm-rg350-a6e1d6bd3dcdc1fae7832ffe26b4d774ec1fe6a3.zip
SKY works with the new GMM implementation, also updated gui/newgui.cpp and prevented pushEvent from pushing more than one EVENT_QUIT into the artificialEventQueue
svn-id: r33041
Diffstat (limited to 'backends/events/default')
-rw-r--r--backends/events/default/default-events.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 24750d038c..b91643c6fb 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -478,7 +478,13 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
}
void DefaultEventManager::pushEvent(Common::Event event) {
- artificialEventQueue.push(event);
+
+ // If already received an EVENT_QUIT, don't add another one
+ if (event.type == Common::EVENT_QUIT) {
+ if (!_shouldQuit)
+ artificialEventQueue.push(event);
+ } else
+ artificialEventQueue.push(event);
}
#endif // !defined(DISABLE_DEFAULT_EVENTMANAGER)