aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/surfacesdl/surfacesdl-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/surfacesdl/surfacesdl-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/surfacesdl/surfacesdl-graphics.h')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index 49bd66b3e5..c4227475c0 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -166,6 +166,17 @@ protected:
/** Hardware screen */
SDL_Surface *_hwscreen;
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ /* SDL2 features a different API for 2D graphics. We create a wrapper
+ * around this API to keep the code paths as close as possible. */
+ SDL_Renderer *_renderer;
+ SDL_Texture *_screenTexture;
+ void deinitializeRenderer();
+
+ SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);
+ void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects);
+#endif
+
/** Unseen game screen */
SDL_Surface *_screen;
#ifdef USE_RGB_COLOR