diff options
author | Alejandro Marzini | 2010-09-03 04:23:01 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-09-03 04:23:01 +0000 |
commit | 91367241102badf06c5955423d95aedf524ed864 (patch) | |
tree | bff602aac9479d0ff7e04e498a3970db228e78cd /backends/graphics | |
parent | 30cbd35e740b801313be83209eec6956feeb512d (diff) | |
download | scummvm-rg350-91367241102badf06c5955423d95aedf524ed864.tar.gz scummvm-rg350-91367241102badf06c5955423d95aedf524ed864.tar.bz2 scummvm-rg350-91367241102badf06c5955423d95aedf524ed864.zip |
SDL/OPENGL: Fix backend initialization when building with ENABLE_VKEYBD.
svn-id: r52503
Diffstat (limited to 'backends/graphics')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 8 | ||||
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.h | 2 | ||||
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.cpp | 8 | ||||
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.h | 2 |
4 files changed, 14 insertions, 6 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 187a7aec26..8682c54921 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -62,9 +62,6 @@ OpenGLGraphicsManager::OpenGLGraphicsManager() _gamePalette = (byte *)calloc(sizeof(byte) * 4, 256); _cursorPalette = (byte *)calloc(sizeof(byte) * 4, 256); - - // Register the graphics manager as a event observer - g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 2, false); } OpenGLGraphicsManager::~OpenGLGraphicsManager() { @@ -83,6 +80,11 @@ OpenGLGraphicsManager::~OpenGLGraphicsManager() { delete _cursorTexture; } +void OpenGLGraphicsManager::initEventObserver() { + // Register the graphics manager as a event observer + g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 10, false); +} + // // Feature // diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 460b3806e8..9b3340aef2 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -57,6 +57,8 @@ public: OpenGLGraphicsManager(); virtual ~OpenGLGraphicsManager(); + virtual void initEventObserver(); + virtual bool hasFeature(OSystem::Feature f); virtual void setFeatureState(OSystem::Feature f, bool enable); virtual bool getFeatureState(OSystem::Feature f); diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 2952ad810b..9540f6dcfc 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -184,9 +184,6 @@ SdlGraphicsManager::SdlGraphicsManager() #else _videoMode.fullscreen = true; #endif - - // Register the graphics manager as a event observer - g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 2, false); } SdlGraphicsManager::~SdlGraphicsManager() { @@ -202,6 +199,11 @@ SdlGraphicsManager::~SdlGraphicsManager() { free(_mouseData); } +void SdlGraphicsManager::initEventObserver() { + // Register the graphics manager as a event observer + g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 10, false); +} + bool SdlGraphicsManager::hasFeature(OSystem::Feature f) { return (f == OSystem::kFeatureFullscreenMode) || diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h index 01ae44222a..7c6f95f134 100644 --- a/backends/graphics/sdl/sdl-graphics.h +++ b/backends/graphics/sdl/sdl-graphics.h @@ -78,6 +78,8 @@ public: SdlGraphicsManager(); virtual ~SdlGraphicsManager(); + virtual void initEventObserver(); + virtual bool hasFeature(OSystem::Feature f); virtual void setFeatureState(OSystem::Feature f, bool enable); virtual bool getFeatureState(OSystem::Feature f); |