mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 07:05:48 +00:00
Allow qrenderdoc command line python scripts to call sys.exit()
* Previously we'd catch the sys.exit "exception" and print it then show the window.
This commit is contained in:
@@ -63,9 +63,7 @@
|
||||
|
||||
#include "pipestate.inl"
|
||||
|
||||
CaptureContext::CaptureContext(QString paramFilename, QString remoteHost, uint32_t remoteIdent,
|
||||
bool temp, PersistantConfig &cfg)
|
||||
: m_Config(cfg)
|
||||
CaptureContext::CaptureContext(PersistantConfig &cfg) : m_Config(cfg)
|
||||
{
|
||||
m_CaptureLoaded = false;
|
||||
m_LoadInProgress = false;
|
||||
@@ -90,25 +88,6 @@ CaptureContext::CaptureContext(QString paramFilename, QString remoteHost, uint32
|
||||
m_Icon->addFile(QStringLiteral(":/logo.svg"), QSize(), QIcon::Normal, QIcon::Off);
|
||||
|
||||
m_MainWindow = new MainWindow(*this);
|
||||
m_MainWindow->show();
|
||||
|
||||
if(remoteIdent != 0)
|
||||
{
|
||||
m_MainWindow->ShowLiveCapture(
|
||||
new LiveCapture(*this, remoteHost, remoteHost, remoteIdent, m_MainWindow, m_MainWindow));
|
||||
}
|
||||
|
||||
if(!paramFilename.isEmpty())
|
||||
{
|
||||
QFileInfo checkFile(paramFilename);
|
||||
|
||||
if(checkFile.exists() && checkFile.isFile())
|
||||
{
|
||||
m_MainWindow->LoadFromFilename(paramFilename, temp);
|
||||
if(temp)
|
||||
m_MainWindow->takeCaptureOwnership();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
QDir dir(configFilePath("extensions"));
|
||||
@@ -137,6 +116,29 @@ CaptureContext::~CaptureContext()
|
||||
delete m_MainWindow;
|
||||
}
|
||||
|
||||
void CaptureContext::Begin(QString paramFilename, QString remoteHost, uint32_t remoteIdent, bool temp)
|
||||
{
|
||||
m_MainWindow->show();
|
||||
|
||||
if(remoteIdent != 0)
|
||||
{
|
||||
m_MainWindow->ShowLiveCapture(
|
||||
new LiveCapture(*this, remoteHost, remoteHost, remoteIdent, m_MainWindow, m_MainWindow));
|
||||
}
|
||||
|
||||
if(!paramFilename.isEmpty())
|
||||
{
|
||||
QFileInfo checkFile(paramFilename);
|
||||
|
||||
if(checkFile.exists() && checkFile.isFile())
|
||||
{
|
||||
m_MainWindow->LoadFromFilename(paramFilename, temp);
|
||||
if(temp)
|
||||
m_MainWindow->takeCaptureOwnership();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CaptureContext::isRunning()
|
||||
{
|
||||
return m_MainWindow && m_MainWindow->isVisible();
|
||||
|
||||
Reference in New Issue
Block a user