Skip to content

Commit

Permalink
Fix broken intro and crash when resizing window
Browse files Browse the repository at this point in the history
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 vcmi#3200
  • Loading branch information
Alexander-Wilms committed Jan 28, 2024
1 parent 4d0c0f1 commit bc2ed6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/renderSDL/ScreenHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bc2ed6a

Please sign in to comment.