From d662e8ca9653a23690d983e5dd38229aed54861d Mon Sep 17 00:00:00 2001 From: nikolas Date: Thu, 18 Jun 2020 03:53:06 -0400 Subject: [PATCH] Fix #8104: Always add WINDOW_RESIZABLE flag to SDL2 (#8211) This fixes a bug that can reproduced with these steps: * Start openttd in fullscreen mode * Turn off fullscreen mode * Try to resize the window. The window can't be resized. --- src/video/sdl2_v.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 0b3b9b8e30..0501f64b56 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -260,12 +260,10 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h, bool resize) seprintf(caption, lastof(caption), "OpenTTD %s", _openttd_revision); if (_sdl_window == nullptr) { - Uint32 flags = SDL_WINDOW_SHOWN; + Uint32 flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE; if (_fullscreen) { flags |= SDL_WINDOW_FULLSCREEN; - } else { - flags |= SDL_WINDOW_RESIZABLE; } _sdl_window = SDL_CreateWindow(