1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Fix page flip animation playback

This commit is contained in:
Ivan Savenko 2024-07-17 11:57:03 +00:00
parent e4be4c3061
commit becd13e03d

View File

@ -586,7 +586,7 @@ bool CVideoPlayer::openAndPlayVideoImpl(const VideoPath & name, const Point & po
return true;
instance.openVideo();
instance.prepareOutput(scale, useOverlay);
instance.prepareOutput(scale, true);
auto lastTimePoint = boost::chrono::steady_clock::now();
@ -608,10 +608,7 @@ bool CVideoPlayer::openAndPlayVideoImpl(const VideoPath & name, const Point & po
rect.w = instance.dimensions.x;
rect.h = instance.dimensions.y;
if(useOverlay)
SDL_RenderFillRect(mainRenderer, &rect);
else
SDL_RenderClear(mainRenderer);
SDL_RenderFillRect(mainRenderer, &rect);
if(instance.textureYUV)
SDL_RenderCopy(mainRenderer, instance.textureYUV, nullptr, &rect);