Pārlūkot izejas kodu

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
Alexander Wilms 1 gadu atpakaļ
vecāks
revīzija
eee1a4d061
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      client/CVideoHandler.cpp

+ 1 - 0
client/CVideoHandler.cpp

@@ -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);