From f044719b9ac56f4667fdbeb16e972006d947c28e Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 7 Feb 2018 18:05:54 +0000 Subject: [PATCH] Add file size limit of 2.25GB for uploaded captures --- qrenderdoc/Windows/Dialogs/CrashDialog.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qrenderdoc/Windows/Dialogs/CrashDialog.cpp b/qrenderdoc/Windows/Dialogs/CrashDialog.cpp index 7f8363e20..68e7d2120 100644 --- a/qrenderdoc/Windows/Dialogs/CrashDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/CrashDialog.cpp @@ -94,6 +94,17 @@ CrashDialog::CrashDialog(PersistantConfig &cfg, QVariantMap crashReportJSON, QWi } cap->Shutdown(); + + if(capInfo.size() > 2250ULL * 1024ULL * 1024ULL) + { + // capture is too large to upload :( + ui->captureFilename->setText( + tr("%1 is too large for upload (%2 MB).").arg(capInfo.fileName()).arg(capInfo.size() >> 20)); + ui->captureUpload->setChecked(false); + ui->captureUpload->setEnabled(false); + + ui->capturePreviewFrame->hide(); + } } else {