System: Switch to new capture file on video FPS change

This commit is contained in:
Stenzek
2024-08-18 12:34:22 +10:00
parent 44a12db931
commit b274bf4d57
4 changed files with 76 additions and 22 deletions

View File

@ -2150,7 +2150,7 @@ bool GPU::RenderDisplay(GPUTexture* target, const GSVector4i display_rect, const
bool GPU::SendDisplayToMediaCapture(MediaCapture* cap)
{
GPUTexture* target = cap->GetRenderTexture();
if (!target)
if (!target) [[unlikely]]
return false;
const bool apply_aspect_ratio =
@ -2163,11 +2163,9 @@ bool GPU::SendDisplayToMediaCapture(MediaCapture* cap)
// Not cleared by RenderDisplay().
g_gpu_device->ClearRenderTarget(target, GPUDevice::DEFAULT_CLEAR_COLOR);
if (!RenderDisplay(target, display_rect, draw_rect, postfx))
if (!RenderDisplay(target, display_rect, draw_rect, postfx)) [[unlikely]]
return false;
// TODO: Check for frame rate change
return cap->DeliverVideoFrame(target);
}