Make event selection 'soft' blocking instead of hard blocking

* Normally SetEventID is synchronous and blocking, and will stall the UI while
  it is processing. However we can at least pop up a progress dialog and allow
  the UI to function (if not be interactive due to the blocking progress dialog)
  when some other long-running task is delaying the processing on the replay
  thread.
This commit is contained in:
baldurk
2020-12-03 15:09:29 +00:00
parent 6bc4e007a0
commit 60409caf8d
3 changed files with 32 additions and 1 deletions
+8
View File
@@ -240,6 +240,12 @@ float ReplayManager::GetCurrentProcessingTime()
return m_CommandTimer.isValid() ? double(m_CommandTimer.elapsed()) / 1000.0 : 0.0;
}
QString ReplayManager::GetCurrentProcessingTag()
{
QMutexLocker lock(&m_TimerLock);
return m_CommandTag;
}
void ReplayManager::AsyncInvoke(const rdcstr &tag, ReplayManager::InvokeCallback m)
{
QString qtag(tag);
@@ -486,6 +492,7 @@ void ReplayManager::run(int proxyRenderer, const QString &capturefile, const Rep
{
QMutexLocker lock(&m_TimerLock);
m_CommandTimer.start();
m_CommandTag = cmd->tag;
}
cmd->method(m_Renderer);
@@ -493,6 +500,7 @@ void ReplayManager::run(int proxyRenderer, const QString &capturefile, const Rep
{
QMutexLocker lock(&m_TimerLock);
m_CommandTimer.invalidate();
m_CommandTag = QString();
}
}