aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/surfacesdl/surfacesdl-graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/surfacesdl/surfacesdl-graphics.h')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index ac9844c849..c4f7346525 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -39,6 +39,15 @@
#define USE_SDL_DEBUG_FOCUSRECT
#endif
+// We have (some) support for resizable windows when SDL2 is used. However
+// the overlay still uses the resolution setup with SDL_SetVideoMode. This
+// makes the GUI look subpar when the user resizes the window. In addition
+// we do not adapt the scale factor right now. Thus, we disable this code
+// path for now.
+#if SDL_VERSION_ATLEAST(2, 0, 0) && 0
+#define USE_SDL_RESIZABLE_WINDOW
+#endif
+
#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
// Uncomment this to enable the 'on screen display' code.
#define USE_OSD 1
@@ -143,6 +152,9 @@ public:
// SdlGraphicsManager interface
virtual void notifyVideoExpose();
+#ifdef USE_SDL_RESIZABLE_WINDOW
+ virtual void notifyResize(const uint width, const uint height);
+#endif
virtual void transformMouseCoordinates(Common::Point &point);
virtual void notifyMousePos(Common::Point mouse);
@@ -174,6 +186,7 @@ protected:
SDL_Rect _viewport;
int _windowWidth, _windowHeight;
void deinitializeRenderer();
+ void setWindowResolution(int width, int height);
SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);
void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects);