mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-31 20:01:12 +00:00
Verify captures are still present before showing them in connection
* If the RenderDoc UI connects to a program, opens then deletes the captures, then closes and is opened again - we don't want to report those deleted captures as if they still exist. This now clears out any captures that no longer exist.
This commit is contained in:
@@ -1825,6 +1825,12 @@ void RenderDoc::AddChildThread(uint32_t pid, Threading::ThreadHandle thread)
|
||||
m_ChildThreads.push_back(make_rdcpair(pid, thread));
|
||||
}
|
||||
|
||||
void RenderDoc::ValidateCaptures()
|
||||
{
|
||||
SCOPED_LOCK(m_CaptureLock);
|
||||
m_Captures.removeIf([](const CaptureData &cap) { return !FileIO::exists(cap.path); });
|
||||
}
|
||||
|
||||
rdcarray<CaptureData> RenderDoc::GetCaptures()
|
||||
{
|
||||
SCOPED_LOCK(m_CaptureLock);
|
||||
|
||||
@@ -453,6 +453,7 @@ public:
|
||||
void CompleteChildThread(uint32_t pid);
|
||||
void AddChildThread(uint32_t pid, Threading::ThreadHandle thread);
|
||||
|
||||
void ValidateCaptures();
|
||||
rdcarray<CaptureData> GetCaptures();
|
||||
|
||||
void MarkCaptureRetrieved(uint32_t idx);
|
||||
|
||||
@@ -152,6 +152,8 @@ void RenderDoc::TargetControlClientThread(uint32_t version, Network::Socket *cli
|
||||
const int progresstime = 100; // update capture progress every 100ms
|
||||
int curtime = 0;
|
||||
|
||||
RenderDoc::Inst().ValidateCaptures();
|
||||
|
||||
rdcarray<CaptureData> captures;
|
||||
rdcarray<rdcpair<uint32_t, uint32_t> > children;
|
||||
std::map<RDCDriver, bool> drivers;
|
||||
|
||||
Reference in New Issue
Block a user