shithub: choc

Download patch

ref: aafbdbb8a3f68d5847cfbdb9e18d21e6f6333c9d
parent: d677f9dcd24d1108927bf422b0cc902152a5a06b
author: Fabian Greffrath <fabian@greffrath.com>
date: Fri Sep 18 06:03:26 EDT 2015

Make sure the pillarboxes are kept clear each frame

thanks again @bradharding for this suggestion

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1092,8 +1092,6 @@
         CreateUpscaledTexture(resize_w, resize_h);
         screen_width = resize_w;
         screen_height = resize_h;
-        SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
-        SDL_RenderClear(renderer);
         need_resize = false;
         palette_to_set = true;
     }
@@ -1159,6 +1157,10 @@
     // Update the intermediate texture with the contents of the RGBA buffer.
 
     SDL_UpdateTexture(texture, NULL, rgbabuffer->pixels, rgbabuffer->pitch);
+
+    // Make sure the pillarboxes are kept clear each frame.
+
+    SDL_RenderClear(renderer);
 
     // Render this intermediate texture into the upscaled texture
     // using "nearest" integer scaling.