From cf2524c90dbc915f8a7f41a6ae7f9c84b3f6b0e7 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 21 Nov 2015 20:38:43 +0100 Subject: [PATCH] Call SDL_RenderClear() after every frame. This ensures there is no cruft visible when resizing the window or toggling fullscreen mode. --- src/CGraphics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CGraphics.cpp b/src/CGraphics.cpp index cde769d..14e9c53 100644 --- a/src/CGraphics.cpp +++ b/src/CGraphics.cpp @@ -195,6 +195,7 @@ void Graphics::updateScreen() SDL_UpdateTexture(texture, NULL, screen->pixels, screen->w * 4); SDL_RenderCopy(renderer, texture, NULL, NULL); SDL_RenderPresent(renderer); + SDL_RenderClear(renderer); if (takeRandomScreenShots) { -- 2.39.5