mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Work around QTBUG-56382 with manual event loop flushing
* See https://bugreports.qt.io/browse/QTBUG-56382 for more details - creating DXGI swapchains adds a windows hook, and enough windows hooks forces out Qt's internal hook which it relies upon for proper event processing.
This commit is contained in:
@@ -62,6 +62,11 @@ CaptureContext::~CaptureContext()
|
||||
delete m_MainWindow;
|
||||
}
|
||||
|
||||
bool CaptureContext::isRunning()
|
||||
{
|
||||
return m_MainWindow && m_MainWindow->isVisible();
|
||||
}
|
||||
|
||||
void CaptureContext::LoadLogfile(QString logFile, bool temporary)
|
||||
{
|
||||
LoadLogfile(-1, "", logFile, temporary);
|
||||
|
||||
@@ -56,6 +56,8 @@ public:
|
||||
CaptureContext(QString paramFilename, QString remoteHost, uint32_t remoteIdent, bool temp);
|
||||
~CaptureContext();
|
||||
|
||||
bool isRunning();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Control functions
|
||||
|
||||
|
||||
@@ -95,13 +95,19 @@ int main(int argc, char *argv[])
|
||||
argv_mod[argc - 2] = arg;
|
||||
argv_mod[argc - 1] = pathChars.data();
|
||||
|
||||
QApplication a(argc, argv_mod);
|
||||
QApplication application(argc, argv_mod);
|
||||
|
||||
CaptureContext ctx(filename, remoteHost, remoteIdent, temp);
|
||||
{
|
||||
CaptureContext ctx(filename, remoteHost, remoteIdent, temp);
|
||||
|
||||
int ret = a.exec();
|
||||
while(ctx.isRunning())
|
||||
{
|
||||
application.processEvents(QEventLoop::WaitForMoreEvents);
|
||||
QCoreApplication::sendPostedEvents();
|
||||
}
|
||||
}
|
||||
|
||||
delete[] argv_mod;
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user