diff options
author | Johannes Schickel | 2013-10-20 22:27:50 +0200 |
---|---|---|
committer | Kamil Zbróg | 2013-10-24 12:59:16 +0100 |
commit | 2784901dac98f5972327a82bde147026cf7d7aee (patch) | |
tree | 06140c429b7510070332d0459cbc8c05adc143e6 /backends/graphics/sdl | |
parent | aebe01f7ecf2faf884a027f5dabf7989bfaae32a (diff) | |
download | scummvm-rg350-2784901dac98f5972327a82bde147026cf7d7aee.tar.gz scummvm-rg350-2784901dac98f5972327a82bde147026cf7d7aee.tar.bz2 scummvm-rg350-2784901dac98f5972327a82bde147026cf7d7aee.zip |
SDL: Clean up graphics manager switching slighty.
Sadly this also requires us to extend GraphicsManager for this SDL specific
feature. However, since that's only used in the SDL backend and Tizen it
should be fine for now...
Diffstat (limited to 'backends/graphics/sdl')
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.cpp | 9 | ||||
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.h | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 2eca4b8aab..417f4faf54 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -26,10 +26,15 @@ SdlGraphicsManager::SdlGraphicsManager(SdlEventSource *source) : _eventSource(source) { - _eventSource->setGraphicsManager(this); } SdlGraphicsManager::~SdlGraphicsManager() { - _eventSource->setGraphicsManager(0); } +void SdlGraphicsManager::initEventSource() { + _eventSource->setGraphicsManager(this); +} + +void SdlGraphicsManager::deinitEventSource() { + _eventSource->setGraphicsManager(0); +} diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h index ea9149fccb..4d4338af16 100644 --- a/backends/graphics/sdl/sdl-graphics.h +++ b/backends/graphics/sdl/sdl-graphics.h @@ -80,6 +80,9 @@ public: virtual void notifyMousePos(Common::Point mouse) = 0; protected: + void initEventSource(); + void deinitEventSource(); + SdlEventSource *_eventSource; }; |