diff options
Diffstat (limited to 'backends/graphics')
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 2 | ||||
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.cpp | 4 | ||||
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.h | 7 | ||||
-rw-r--r-- | backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 2 |
4 files changed, 4 insertions, 11 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index f76d7b2ec0..3f9fc1fbd5 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -74,7 +74,6 @@ OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager() { void OpenGLSdlGraphicsManager::activateManager() { SdlGraphicsManager::activateManager(); - initEventSource(); // Register the graphics manager as a event observer g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 10, false); @@ -86,7 +85,6 @@ void OpenGLSdlGraphicsManager::deactivateManager() { g_system->getEventManager()->getEventDispatcher()->unregisterObserver(this); } - deinitEventSource(); SdlGraphicsManager::deactivateManager(); } diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 417f4faf54..40b97b267b 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -31,10 +31,10 @@ SdlGraphicsManager::SdlGraphicsManager(SdlEventSource *source) SdlGraphicsManager::~SdlGraphicsManager() { } -void SdlGraphicsManager::initEventSource() { +void SdlGraphicsManager::activateManager() { _eventSource->setGraphicsManager(this); } -void SdlGraphicsManager::deinitEventSource() { +void SdlGraphicsManager::deactivateManager() { _eventSource->setGraphicsManager(0); } diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h index fea743b3ca..3791961cfa 100644 --- a/backends/graphics/sdl/sdl-graphics.h +++ b/backends/graphics/sdl/sdl-graphics.h @@ -44,13 +44,13 @@ public: * process inputs now. However, even without being active it should be * able to query the supported modes and other bits. */ - virtual void activateManager() {} + virtual void activateManager(); /** * Makes this graphics manager inactive. This should allow another * graphics manager to become active again. */ - virtual void deactivateManager() {} + virtual void deactivateManager(); /** * Notify the graphics manager that the graphics needs to be redrawn, since @@ -92,9 +92,6 @@ public: virtual void notifyMousePos(Common::Point mouse) = 0; protected: - void initEventSource(); - void deinitEventSource(); - SdlEventSource *_eventSource; }; diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 15193e2da4..d15fd6d8ef 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -199,7 +199,6 @@ SurfaceSdlGraphicsManager::~SurfaceSdlGraphicsManager() { void SurfaceSdlGraphicsManager::activateManager() { SdlGraphicsManager::activateManager(); - initEventSource(); // Register the graphics manager as a event observer g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 10, false); @@ -211,7 +210,6 @@ void SurfaceSdlGraphicsManager::deactivateManager() { g_system->getEventManager()->getEventDispatcher()->unregisterObserver(this); } - deinitEventSource(); SdlGraphicsManager::deactivateManager(); } |