Sdl12-compat: Clear the renderer before presenting the surface

From df0382b7b8939d90d20b2c8640cb8273af5282b5 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 22 Feb 2021 01:54:05 -0500
Subject: [PATCH] Clear the renderer before presenting the surface.

This fixes corruption if logical sizing's letterboxing isn't properly
cleared (the window was resized, the Steam Overlay wrote to these
pixels, etc).

This is part of the fix for Issue #25.
---
 src/SDL12_compat.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 3369d32..39b7cb1 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -3366,6 +3366,10 @@ PresentScreen(void)
     }
 
     SDL20_UnlockTexture(VideoTexture20);
+
+    SDL20_SetRenderDrawColor(VideoRenderer20, 0, 0, 0, 255);
+    SDL20_RenderClear(VideoRenderer20);
+    SDL20_SetRenderDrawColor(VideoRenderer20, 255, 255, 255, 255);
     SDL20_RenderCopy(VideoRenderer20, VideoTexture20, NULL, NULL);
     SDL20_RenderPresent(VideoRenderer20);
     VideoSurfaceLastPresentTicks = SDL20_GetTicks();