aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-13 15:42:53 +0000
committerJohannes Schickel2010-10-13 15:42:53 +0000
commit34302765caecabf21cc884de95805b3e1d8f8ea1 (patch)
tree82f7e3b1ae2b3300d66ccb47cb52eb5d088b837e /backends/graphics
parent1769b520aaf066bb8298c8e2f9d089fb69cf0c02 (diff)
downloadscummvm-rg350-34302765caecabf21cc884de95805b3e1d8f8ea1.tar.gz
scummvm-rg350-34302765caecabf21cc884de95805b3e1d8f8ea1.tar.bz2
scummvm-rg350-34302765caecabf21cc884de95805b3e1d8f8ea1.zip
OPENGL: Get rid of one ugly cast.
svn-id: r53435
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp5
-rw-r--r--backends/graphics/sdl/sdl-graphics.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 2c0320f5d0..36d4c52239 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -120,8 +120,9 @@ static AspectRatio getDesiredAspectRatio() {
}
#endif
-SdlGraphicsManager::SdlGraphicsManager()
+SdlGraphicsManager::SdlGraphicsManager(SdlEventSource *sdlEventSource)
:
+ _sdlEventSource(sdlEventSource),
#ifdef USE_OSD
_osdSurface(0), _osdAlpha(SDL_ALPHA_TRANSPARENT), _osdFadeStartTime(0),
#endif
@@ -821,7 +822,7 @@ bool SdlGraphicsManager::loadGFXMode() {
SDL_SetColorKey(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kOSDColorKey);
#endif
- ((SdlEventSource *)g_system)->resetKeyboadEmulation(
+ _sdlEventSource->resetKeyboadEmulation(
_videoMode.screenWidth * _videoMode.scaleFactor - 1,
effectiveScreenHeight() - 1);
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 7c6f95f134..62f87ee238 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -31,6 +31,8 @@
#include "common/events.h"
#include "common/system.h"
+#include "backends/events/sdl/sdl-events.h"
+
#if defined(__SYMBIAN32__)
#include <esdl\SDL.h>
#else
@@ -75,7 +77,7 @@ public:
*/
class SdlGraphicsManager : public GraphicsManager, public Common::EventObserver {
public:
- SdlGraphicsManager();
+ SdlGraphicsManager(SdlEventSource *sdlEventSource);
virtual ~SdlGraphicsManager();
virtual void initEventObserver();
@@ -136,6 +138,8 @@ public:
bool notifyEvent(const Common::Event &event);
protected:
+ SdlEventSource *_sdlEventSource;
+
#ifdef USE_OSD
/** Surface containing the OSD message */
SDL_Surface *_osdSurface;