1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

fix for smaller window

This commit is contained in:
Laserlicht 2024-09-22 17:20:43 +02:00
parent 8907dc9362
commit b7b4277043

View File

@ -1628,10 +1628,10 @@ VideoWindow::VideoWindow(VideoPath video, ImagePath rim, bool showBackground, fl
} }
else else
{ {
blackBackground = std::make_shared<GraphicalPrimitiveCanvas>(Rect(0, 0, pos.w, pos.h)); blackBackground = std::make_shared<GraphicalPrimitiveCanvas>(Rect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y));
blackBackground->addBox(Point(0, 0), Point(pos.w, pos.h), Colors::BLACK);
videoPlayer = std::make_shared<VideoWidgetOnce>(Point(0, 0), video, true, scaleFactor, [this](){ exit(false); }); videoPlayer = std::make_shared<VideoWidgetOnce>(Point(0, 0), video, true, scaleFactor, [this](){ exit(false); });
pos = center(Rect(0, 0, videoPlayer->pos.w, videoPlayer->pos.h)); pos = center(Rect(0, 0, videoPlayer->pos.w, videoPlayer->pos.h));
blackBackground->addBox(Point(0, 0), Point(pos.x, pos.y), Colors::BLACK);
} }
if(backgroundAroundWindow) if(backgroundAroundWindow)