diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 7 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 5b38cbb9b4..38bf4d0ba9 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -112,7 +112,7 @@ void OSystem_SDL::initBackend() { // Creates the backend managers, if they don't exist yet (we check // for this to allow subclasses to provide their own). if (_eventManager == 0) - _eventManager = new SdlEventManager(this); + _eventManager = new DefaultEventManager(this); // We have to initialize the graphics manager before the event manager // so the virtual keyboard can be initialized, but we have to add the @@ -289,11 +289,6 @@ void OSystem_SDL::setupIcon() { free(icon); } -bool OSystem_SDL::pollEvent(Common::Event &event) { - assert(_eventManager); - return ((SdlEventManager *)_eventManager)->pollSdlEvent(event); -} - uint32 OSystem_SDL::getMillis() { uint32 millis = SDL_GetTicks(); g_eventRec.processMillis(millis); diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 17d4dc4ed9..9ef2573dad 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -34,11 +34,12 @@ #include "backends/modular-backend.h" #include "backends/mixer/sdl/sdl-mixer.h" +#include "backends/events/sdl/sdl-events.h" /** * Base OSystem class for all SDL ports. */ -class OSystem_SDL : public ModularBackend { +class OSystem_SDL : public ModularBackend, public SdlEventSource { public: OSystem_SDL(); virtual ~OSystem_SDL(); @@ -66,7 +67,6 @@ public: virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0); virtual Common::SeekableReadStream *createConfigReadStream(); virtual Common::WriteStream *createConfigWriteStream(); - virtual bool pollEvent(Common::Event &event); virtual uint32 getMillis(); virtual void delayMillis(uint msecs); virtual void getTimeAndDate(TimeDate &td) const; |