From 9993435cf94f4f389b7f0807a39df5121f942fd5 Mon Sep 17 00:00:00 2001 From: Nicolas Adenis-Lamarre Date: Wed, 8 Feb 2017 22:31:26 +0100 Subject: [PATCH] sdl2 renderer: remove the random flashing black borders on the batocera linux distribution (https://github.com/nadenislamarre/batocera.linux), retroarch gives some flashing black borders sometimes when running a game. It looks like sometimes the rendering is done without clearing the screen causing this flashing effect. Signed-off-by: Nicolas Adenis-Lamarre --- gfx/drivers/sdl2_gfx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index de65f8ffff..f8275ffd49 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -505,6 +505,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, { static struct retro_perf_counter sdl_copy_frame = {0}; + SDL_RenderClear(vid->renderer); sdl_refresh_input_size(vid, false, vid->video.rgb32, width, height, pitch); performance_counter_init(sdl_copy_frame, "sdl_copy_frame");