From 71738d12e00f4589b3409aa92407ec1a1a201e11 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 12 Aug 2024 22:16:30 +1000 Subject: [PATCH] GPU: Clear RT before sending to media capture Fixes junk in inactive areas on Mac. --- src/core/gpu.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index e57332bfb..e26d445d2 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -2159,6 +2159,10 @@ bool GPU::SendDisplayToMediaCapture(MediaCapture* cap) GSVector4i display_rect, draw_rect; CalculateDrawRect(target->GetWidth(), target->GetHeight(), !g_settings.debugging.show_vram, apply_aspect_ratio, &display_rect, &draw_rect); + + // Not cleared by RenderDisplay(). + g_gpu_device->ClearRenderTarget(target, GPUDevice::DEFAULT_CLEAR_COLOR); + if (!RenderDisplay(target, display_rect, draw_rect, postfx)) return false;