From 7bacf7f79baa58cc269c7fafba877ab4c846e73c Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 23 Oct 2026 16:21:28 +0100 Subject: [PATCH] If saving a remote capture on shutdown, wait for transfer before exit --- qrenderdoc/Windows/Dialogs/LiveCapture.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qrenderdoc/Windows/Dialogs/LiveCapture.cpp b/qrenderdoc/Windows/Dialogs/LiveCapture.cpp index ad750cec9..fa09c2ec5 100644 --- a/qrenderdoc/Windows/Dialogs/LiveCapture.cpp +++ b/qrenderdoc/Windows/Dialogs/LiveCapture.cpp @@ -912,6 +912,13 @@ bool LiveCapture::checkAllowClose(int totalUnsavedCaptures, bool &noToAll) { bool success = saveCapture(cap, QString()); + // need to wait for the transfer to finish before exiting, when captureCopied() is called + // cap->local will become true. Otherwise wait until the transfer is finished or we disconnect + // for another reason - and offer a cancel button + ShowProgressDialog( + this, tr("Transferring file."), [this, cap]() { return !IsConnected() || cap->local; }, + NULL, [&success]() { success = false; }); + if(!success) { m_IgnoreThreadClosed = false;