Generalise progress tracking to allow multiple progress updates

* We track the progress through making a capture as well as the progress
  we already tracked loading a capture.
* Also incidentally fix a copy-paste bug that was calculating the wrong
  progress for loading captures by applying FileInitialRead instead of
  FrameEventsRead for the frame replay.
This commit is contained in:
baldurk
2017-12-29 14:25:33 +00:00
parent 332e9b70a3
commit ed98925eef
14 changed files with 173 additions and 62 deletions
+2 -2
View File
@@ -406,7 +406,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData)
bool kill = false;
float progress = 0.0f;
RenderDoc::Inst().SetProgressPtr(&progress);
RenderDoc::Inst().SetProgressPointer<LoadProgress>(&progress);
Threading::ThreadHandle ticker = Threading::CreateThread([&writer, &kill, &progress]() {
while(!kill)
@@ -439,7 +439,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData)
}
else
{
RenderDoc::Inst().SetProgressPtr(NULL);
RenderDoc::Inst().SetProgressPointer<LoadProgress>(NULL);
kill = true;
Threading::JoinThread(ticker);