aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2013-10-24 00:03:09 +0200
committerJohannes Schickel2013-10-24 00:03:09 +0200
commit281672e1718d5f960061b714f79924125922e1e5 (patch)
treee75166443a07dd3aecc818c95e929af951c5ee71
parent1fc5d52e906186bdde6e5c46e84268b9c958691c (diff)
downloadscummvm-rg350-281672e1718d5f960061b714f79924125922e1e5.tar.gz
scummvm-rg350-281672e1718d5f960061b714f79924125922e1e5.tar.bz2
scummvm-rg350-281672e1718d5f960061b714f79924125922e1e5.zip
SDL: Let SdlGraphicsManager inherit from GraphicsManager.
-rw-r--r--backends/graphics/opengl/opengl-graphics.h2
-rw-r--r--backends/graphics/sdl/sdl-graphics.h7
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.h2
3 files changed, 5 insertions, 6 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index d2d0358407..93c0c5bc83 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -47,7 +47,7 @@ enum {
GFX_NEAREST = 1
};
-class OpenGLGraphicsManager : public GraphicsManager {
+class OpenGLGraphicsManager : virtual public GraphicsManager {
public:
OpenGLGraphicsManager();
virtual ~OpenGLGraphicsManager();
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 4d4338af16..ebf8078f23 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -23,6 +23,8 @@
#ifndef BACKENDS_GRAPHICS_SDL_SDLGRAPHICS_H
#define BACKENDS_GRAPHICS_SDL_SDLGRAPHICS_H
+#include "backends/graphics/graphics.h"
+
#include "common/rect.h"
class SdlEventSource;
@@ -31,11 +33,8 @@ class SdlEventSource;
* Base class for a SDL based graphics manager.
*
* It features a few extra a few extra features required by SdlEventSource.
- * FIXME/HACK:
- * Note it does not inherit from GraphicsManager to avoid a diamond inheritance
- * in the current OpenGLSdlGraphicsManager.
*/
-class SdlGraphicsManager {
+class SdlGraphicsManager : virtual public GraphicsManager {
public:
SdlGraphicsManager(SdlEventSource *source);
virtual ~SdlGraphicsManager();
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index 00c05ff2bf..22b7780675 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -75,7 +75,7 @@ public:
/**
* SDL graphics manager
*/
-class SurfaceSdlGraphicsManager : public GraphicsManager, public SdlGraphicsManager, public Common::EventObserver {
+class SurfaceSdlGraphicsManager : public SdlGraphicsManager, public Common::EventObserver {
public:
SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSource);
virtual ~SurfaceSdlGraphicsManager();