mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-13 19:17:12 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user