1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-06 03:52:37 +01:00

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.
This commit is contained in:
nikolas
2020-06-18 03:53:06 -04:00
committed by Charles Pigott
parent 762f5d258a
commit d662e8ca96

View File

@@ -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(