aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2009-07-25 01:00:12 +0000
committerJohannes Schickel2009-07-25 01:00:12 +0000
commitdafd5d509b4f31d06a40d03f4b0c96e04703fb95 (patch)
treeeb4461e82f6dd267d920b1f04830a26ebd4c5ade /backends
parent60e7faf9b6026d73ffb0709dfab44f734fdba332 (diff)
downloadscummvm-rg350-dafd5d509b4f31d06a40d03f4b0c96e04703fb95.tar.gz
scummvm-rg350-dafd5d509b4f31d06a40d03f4b0c96e04703fb95.tar.bz2
scummvm-rg350-dafd5d509b4f31d06a40d03f4b0c96e04703fb95.zip
Made DefaultEventManager a subclass of EventObserver.
svn-id: r42723
Diffstat (limited to 'backends')
-rw-r--r--backends/events/default/default-events.cpp1
-rw-r--r--backends/events/default/default-events.h8
2 files changed, 7 insertions, 2 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 799ac6ec14..12bb766cd6 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -594,7 +594,6 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
}
void DefaultEventManager::pushEvent(const Common::Event &event) {
-
// If already received an EVENT_QUIT, don't add another one
if (event.type == Common::EVENT_QUIT) {
if (!_shouldQuit)
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h
index 4124dd956b..e4c33bc554 100644
--- a/backends/events/default/default-events.h
+++ b/backends/events/default/default-events.h
@@ -41,7 +41,7 @@ namespace Common {
}
-class DefaultEventManager : public Common::EventManager {
+class DefaultEventManager : public Common::EventManager, Common::EventObserver {
Common::EventSource *_boss;
#ifdef ENABLE_VKEYBD
@@ -74,6 +74,12 @@ class DefaultEventManager : public Common::EventManager {
bool allowMapping() const { return false; }
} _artificialEventSource;
+ Common::Queue<Common::Event> _eventQueue;
+ bool notifyEvent(const Common::Event &ev) {
+ _eventQueue.push(ev);
+ return true;
+ }
+
Common::Point _mousePos;
int _buttonState;
int _modifierState;