mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 14:15:42 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user