mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 23:16:31 +00:00
Don't return true from GetTrackedFileData() if no data has been loaded
The file might be being tracked but wasn't loaded from the embedded files in the capture i.e. it hasn't been physically embedded yet.
This commit is contained in:
@@ -2455,8 +2455,9 @@ bool RenderDoc::GetTrackedFileData(const rdcstr &nickname, bytebuf &data) const
|
||||
{
|
||||
if(f.nickname == nickname)
|
||||
{
|
||||
data = f.data;
|
||||
return true;
|
||||
if(f.hasData)
|
||||
data = f.data;
|
||||
return f.hasData;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -2595,6 +2596,7 @@ RDResult RenderDoc::ReadExternalFiles(RDCFile *rdc)
|
||||
{
|
||||
file.data = f.data;
|
||||
file.filepath.clear();
|
||||
file.hasData = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -656,11 +656,18 @@ private:
|
||||
struct TrackedFile
|
||||
{
|
||||
TrackedFile() = default;
|
||||
TrackedFile(const rdcstr &name, const rdcstr &path) : nickname(name), filepath(path) {}
|
||||
TrackedFile(const rdcstr &name, const bytebuf &contents) : nickname(name), data(contents) {}
|
||||
TrackedFile(const rdcstr &name, const rdcstr &path)
|
||||
: nickname(name), filepath(path), hasData(false)
|
||||
{
|
||||
}
|
||||
TrackedFile(const rdcstr &name, const bytebuf &contents)
|
||||
: nickname(name), data(contents), hasData(true)
|
||||
{
|
||||
}
|
||||
rdcstr nickname;
|
||||
rdcstr filepath;
|
||||
bytebuf data;
|
||||
bool hasData;
|
||||
};
|
||||
|
||||
void SyncAvailableGPUThread();
|
||||
|
||||
Reference in New Issue
Block a user