From dafd5d509b4f31d06a40d03f4b0c96e04703fb95 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 25 Jul 2009 01:00:12 +0000 Subject: Made DefaultEventManager a subclass of EventObserver. svn-id: r42723 --- backends/events/default/default-events.cpp | 1 - backends/events/default/default-events.h | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'backends/events') 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 _eventQueue; + bool notifyEvent(const Common::Event &ev) { + _eventQueue.push(ev); + return true; + } + Common::Point _mousePos; int _buttonState; int _modifierState; -- cgit v1.2.3