소스 검색

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 년 전
부모
커밋
eee1a4d061
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);