From 2f748810bff975585c55fa5481946c49201f3672 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Sun, 13 Sep 2020 19:38:40 +0100 Subject: [PATCH] Disable blending for the upscaled framebuffer I'd set it to RGB24 instead of RGBA32, but I don't know if there'd be a performance penalty. --- src/Backends/Rendering/SDLTexture.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Backends/Rendering/SDLTexture.cpp b/src/Backends/Rendering/SDLTexture.cpp index 15fe8dd0..a1f790ec 100644 --- a/src/Backends/Rendering/SDLTexture.cpp +++ b/src/Backends/Rendering/SDLTexture.cpp @@ -452,6 +452,8 @@ void RenderBackend_HandleWindowResize(size_t width, size_t height) if (upscaled_framebuffer.texture == NULL) Backend_PrintError("Couldn't regenerate upscaled framebuffer"); + SDL_SetTextureBlendMode(upscaled_framebuffer.texture, SDL_BLENDMODE_NONE); + // Create rect that forces 4:3 no matter what size the window is float window_ratio = (float)width / height; float framebuffer_ratio = (float)upscaled_framebuffer.width / upscaled_framebuffer.height;