Add ReplayOptions struct to contain replay-time configuration

* Not currently exposed to the UI or used by the drivers, we just pass the
  default object through
This commit is contained in:
baldurk
2019-08-27 18:51:56 +01:00
parent 878acd4ad9
commit 20be9f3d52
27 changed files with 250 additions and 71 deletions
+1 -1
View File
@@ -760,7 +760,7 @@ void LiveCapture::openCapture(Capture *cap)
return;
}
m_Main->LoadCapture(cap->path, !cap->saved, cap->local);
m_Main->LoadCapture(cap->path, ReplayOptions(), !cap->saved, cap->local);
}
bool LiveCapture::saveCapture(Capture *cap, QString path)
+6 -5
View File
@@ -487,7 +487,7 @@ void MainWindow::LoadFromFilename(const QString &filename, bool temporary)
if(ext == lit("rdc"))
{
LoadCapture(filename, temporary, true);
LoadCapture(filename, ReplayOptions(), temporary, true);
}
else if(ext == lit("cap"))
{
@@ -500,7 +500,7 @@ void MainWindow::LoadFromFilename(const QString &filename, bool temporary)
else
{
// not a recognised filetype, see if we can load it anyway
LoadCapture(filename, temporary, true);
LoadCapture(filename, ReplayOptions(), temporary, true);
}
}
@@ -633,7 +633,8 @@ void MainWindow::OnInjectTrigger(uint32_t PID, const rdcarray<EnvironmentModific
th->deleteLater();
}
void MainWindow::LoadCapture(const QString &filename, bool temporary, bool local)
void MainWindow::LoadCapture(const QString &filename, const ReplayOptions &opts, bool temporary,
bool local)
{
if(PromptCloseCapture())
{
@@ -800,7 +801,7 @@ void MainWindow::LoadCapture(const QString &filename, bool temporary, bool local
ANALYTIC_SET(UIFeatures.ImageViewer, true);
}
m_Ctx.LoadCapture(fileToLoad, origFilename, temporary, local);
m_Ctx.LoadCapture(fileToLoad, opts, origFilename, temporary, local);
}
if(local && !temporary)
@@ -1506,7 +1507,7 @@ void MainWindow::recentCaptureFile(const QString &filename)
{
if(QFileInfo::exists(filename))
{
LoadCapture(filename, false, true);
LoadCapture(filename, ReplayOptions(), false, true);
}
else
{
+1 -1
View File
@@ -77,7 +77,7 @@ public:
void takeCaptureOwnership() { m_OwnTempCapture = true; }
void captureModified();
void LoadFromFilename(const QString &filename, bool temporary);
void LoadCapture(const QString &filename, bool temporary, bool local);
void LoadCapture(const QString &filename, const ReplayOptions &opts, bool temporary, bool local);
void CloseCapture();
QString GetSavePath(QString title = QString(), QString filter = QString());
+3 -3
View File
@@ -173,10 +173,10 @@ struct CaptureContextInvoker : ICaptureContext
{
return InvokeRetFunction<WindowingData>(&ICaptureContext::CreateWindowingData, window);
}
virtual void LoadCapture(const rdcstr &capture, const rdcstr &origFilename, bool temporary,
bool local) override
virtual void LoadCapture(const rdcstr &capture, const ReplayOptions &opts,
const rdcstr &origFilename, bool temporary, bool local) override
{
InvokeVoidFunction(&ICaptureContext::LoadCapture, capture, origFilename, temporary, local);
InvokeVoidFunction(&ICaptureContext::LoadCapture, capture, opts, origFilename, temporary, local);
}
virtual bool SaveCaptureTo(const rdcstr &capture) override
{