diff options
author | vanfanel | 2015-11-11 17:56:12 +0100 |
---|---|---|
committer | vanfanel | 2015-11-11 17:56:12 +0100 |
commit | 99739a13fe844c807d3cdd87e67e207e888fd48a (patch) | |
tree | 6afbf4763326277efbf528f0bb9e587bf7a01788 /backends/graphics/surfacesdl/surfacesdl-graphics.h | |
parent | 37e157a11c3fc731dfdcf6ec6b6a5a448550219b (diff) | |
parent | 7e44493fe8877a3c6a65f83b9ed84a5f59169005 (diff) | |
download | scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.gz scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.bz2 scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.zip |
Merge branch 'master' into dispmanx
Diffstat (limited to 'backends/graphics/surfacesdl/surfacesdl-graphics.h')
-rw-r--r-- | backends/graphics/surfacesdl/surfacesdl-graphics.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h index 49bd66b3e5..2431ce8664 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.h +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h @@ -77,7 +77,7 @@ public: */ class SurfaceSdlGraphicsManager : public SdlGraphicsManager, public Common::EventObserver { public: - SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSource); + SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window); virtual ~SurfaceSdlGraphicsManager(); virtual void activateManager(); @@ -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 @@ -225,6 +236,9 @@ protected: }; VideoState _videoMode, _oldVideoMode; + // Original BPP to restore the video mode on unload + uint8 _originalBitsPerPixel; + /** Force full redraw on next updateScreen */ bool _forceFull; |