From 13f796a0ef227e3d4cba34b6e8f530162028de67 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 19 Nov 2019 22:58:24 +0000 Subject: [PATCH] Add an error if intent arguments aren't formatted correctly. --- qrenderdoc/Windows/Dialogs/CaptureDialog.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp b/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp index 91a1224ae..23fca81a0 100644 --- a/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp @@ -1275,6 +1275,22 @@ void CaptureDialog::TriggerCapture() PopulateMostRecent(); + if(m_Ctx.Replay().CurrentRemote().Protocol() && + m_Ctx.Replay().CurrentRemote().Protocol()->GetProtocolName() == "adb") + { + cmdLine = cmdLine.trimmed(); + + if(!cmdLine.isEmpty() && cmdLine[0] != QLatin1Char('-')) + { + RDDialog::critical(this, tr("Invalid intent arguments"), + tr("Invalid intent arguments: %1\n" + "The intent arguments must include the full parameters e.g. " + "--es args \"my arguments\"") + .arg(cmdLine)); + return; + } + } + m_CaptureCallback(exe, workingDir, cmdLine, Settings().environment, Settings().options, [this](LiveCapture *live) { if(ui->queueFrameCap->isChecked())