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.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 216fc2d200..3a53a4e40e 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -129,6 +129,31 @@ public:
*/
void iconifyWindow();
+ /**
+ * A (subset) of the graphic manager's state. This is used when switching
+ * between different SDL graphic managers on runtime.
+ */
+ struct State {
+ int screenWidth, screenHeight;
+ bool aspectRatio;
+ bool fullscreen;
+ bool cursorPalette;
+
+#ifdef USE_RGB_COLOR
+ Graphics::PixelFormat pixelFormat;
+#endif
+ };
+
+ /**
+ * Queries the current state of the graphic manager.
+ */
+ State getState();
+
+ /**
+ * Setup a basic state of the graphic manager.
+ */
+ bool setState(const State &state);
+
protected:
SdlEventSource *_eventSource;
};