1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-11 11:31:52 +02:00

CVideoHandler.cpp: Clear screen before rendering each frame of the intro

This way, the background is black instead of showing glitchy artifacts when one resizes the window
This commit is contained in:
Alexander Wilms 2023-11-10 03:37:38 +01:00
parent 439ce114cb
commit eee1a4d061

View File

@ -631,6 +631,7 @@ bool CVideoPlayer::playVideo(int x, int y, bool stopOnKey)
SDL_Rect rect = CSDL_Ext::toSDL(pos);
SDL_RenderClear(mainRenderer);
SDL_RenderCopy(mainRenderer, texture, nullptr, &rect);
SDL_RenderPresent(mainRenderer);