aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/sdl/sdl-graphics.h
diff options
context:
space:
mode:
authorJohannes Schickel2015-01-25 01:34:57 +0100
committerJohannes Schickel2015-01-25 20:23:25 +0100
commit8530997fff7b5b9d558f7dd6a0d07c236e4de16f (patch)
tree3ded3cc11bae7b50138f35be7626cdae9c400af2 /backends/graphics/sdl/sdl-graphics.h
parentdefe71792dfc0ab4bcb14a64a9fc8eab9a638e69 (diff)
downloadscummvm-rg350-8530997fff7b5b9d558f7dd6a0d07c236e4de16f.tar.gz
scummvm-rg350-8530997fff7b5b9d558f7dd6a0d07c236e4de16f.tar.bz2
scummvm-rg350-8530997fff7b5b9d558f7dd6a0d07c236e4de16f.zip
SDL: Add experimental support for SDL2.
This is based upon skristiansson's change set to make ScummVM work with SDL2.
Diffstat (limited to 'backends/graphics/sdl/sdl-graphics.h')
-rw-r--r--backends/graphics/sdl/sdl-graphics.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 3a53a4e40e..af7242b99e 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -134,6 +134,9 @@ public:
* between different SDL graphic managers on runtime.
*/
struct State {
+ State();
+ ~State();
+
int screenWidth, screenHeight;
bool aspectRatio;
bool fullscreen;
@@ -142,6 +145,12 @@ public:
#ifdef USE_RGB_COLOR
Graphics::PixelFormat pixelFormat;
#endif
+
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ bool inputGrabState;
+ Common::String windowCaption;
+ SDL_Surface *windowIcon;
+#endif
};
/**
@@ -156,6 +165,17 @@ public:
protected:
SdlEventSource *_eventSource;
+
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ SDL_Window *_window;
+
+ bool createWindow(int width, int height, uint32 flags);
+ void destroyWindow();
+private:
+ bool _inputGrabState;
+ Common::String _windowCaption;
+ SDL_Surface *_windowIcon;
+#endif
};
#endif