From 8530997fff7b5b9d558f7dd6a0d07c236e4de16f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 25 Jan 2015 01:34:57 +0100 Subject: SDL: Add experimental support for SDL2. This is based upon skristiansson's change set to make ScummVM work with SDL2. --- backends/graphics/surfacesdl/surfacesdl-graphics.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'backends/graphics/surfacesdl/surfacesdl-graphics.h') 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 -- cgit v1.2.3