aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/sdl/sdl-graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/sdl/sdl-graphics.h')
-rw-r--r--backends/graphics/sdl/sdl-graphics.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 4d4338af16..3791961cfa 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,16 +33,26 @@ 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();
/**
+ * Makes this graphics manager active. That means it should be ready to
+ * process inputs now. However, even without being active it should be
+ * able to query the supported modes and other bits.
+ */
+ virtual void activateManager();
+
+ /**
+ * Makes this graphics manager inactive. This should allow another
+ * graphics manager to become active again.
+ */
+ virtual void deactivateManager();
+
+ /**
* Notify the graphics manager that the graphics needs to be redrawn, since
* the application window was modified.
*
@@ -80,9 +92,6 @@ public:
virtual void notifyMousePos(Common::Point mouse) = 0;
protected:
- void initEventSource();
- void deinitEventSource();
-
SdlEventSource *_eventSource;
};