From 969dd565a135664dcf341af9132dd97b6ec357e9 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Wed, 19 Jul 2017 21:11:00 -0500 Subject: SDL: Allow window resize with non-OpenGL SDL2 backend The GUI is not redrawn when the window size changes, but that is not as important as being able to resize the games themselves. --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 5 +---- backends/graphics/surfacesdl/surfacesdl-graphics.h | 9 --------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 9d0f217184..fb9870910b 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -2792,10 +2792,7 @@ void SurfaceSdlGraphicsManager::recreateScreenTexture() { SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) { deinitializeRenderer(); - uint32 createWindowFlags = 0; -#ifdef USE_SDL_RESIZABLE_WINDOW - createWindowFlags |= SDL_WINDOW_RESIZABLE; -#endif + uint32 createWindowFlags = SDL_WINDOW_RESIZABLE; if ((flags & SDL_FULLSCREEN) != 0) { createWindowFlags |= SDL_WINDOW_FULLSCREEN_DESKTOP; } diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h index 62a4a38d3e..85f63cb61a 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.h +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h @@ -39,15 +39,6 @@ #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 -- cgit v1.2.3