1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-08 22:26:51 +02:00

Merge pull request #5294 from Laserlicht/video_bg

[1.6.4] fix video background
This commit is contained in:
Ivan Savenko
2025-01-20 15:48:08 +02:00
committed by GitHub

View File

@ -1684,7 +1684,7 @@ VideoWindow::VideoWindow(const VideoPath & video, const ImagePath & rim, bool sh
blackBackground = std::make_shared<GraphicalPrimitiveCanvas>(Rect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y)); blackBackground = std::make_shared<GraphicalPrimitiveCanvas>(Rect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y));
videoPlayer = std::make_shared<VideoWidgetOnce>(Point(0, 0), video, true, scaleFactor, this); videoPlayer = std::make_shared<VideoWidgetOnce>(Point(0, 0), video, true, scaleFactor, this);
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); blackBackground->addBox(Point(0, 0), Point(videoPlayer->pos.w, videoPlayer->pos.h), Colors::BLACK);
} }
if(backgroundAroundWindow) if(backgroundAroundWindow)