From bc2ed6a1b1be286c553886b50b19a016c89861a6 Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Sun, 19 Nov 2023 18:28:03 +0100 Subject: [PATCH] Fix broken intro and crash when resizing window VCMI created a texture with the height of the original intro video, and the aspect ratio of the actual VCMI window. This resulted in a texture with a width greater than 16384 px. Fixes #3200 --- client/renderSDL/ScreenHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/renderSDL/ScreenHandler.cpp b/client/renderSDL/ScreenHandler.cpp index 265c3b021ba..4240d8b6985 100644 --- a/client/renderSDL/ScreenHandler.cpp +++ b/client/renderSDL/ScreenHandler.cpp @@ -311,7 +311,7 @@ void ScreenHandler::initializeScreenBuffers() int amask = 0xFF000000; #endif - auto logicalSize = getPreferredLogicalResolution(); + auto logicalSize = getPreferredWindowResolution(); SDL_RenderSetLogicalSize(mainRenderer, logicalSize.x, logicalSize.y); screen = SDL_CreateRGBSurface(0, logicalSize.x, logicalSize.y, 32, rmask, gmask, bmask, amask);