mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
When trying to find a section by name, try known sections names
* In theory all sections of a known type should be written with their proper normalised name, but just in case a capture is a bit misformed let's try to look it up by type.
This commit is contained in:
@@ -696,6 +696,12 @@ int RDCFile::SectionIndex(const char *name) const
|
||||
if(m_Sections[i].name == name)
|
||||
return int(i);
|
||||
|
||||
// last ditch, see if name is a known section type and search for that type. This should have been
|
||||
// normalised on write, but maybe it didn't
|
||||
for(SectionType s : values<SectionType>())
|
||||
if(ToStr(s) == name)
|
||||
return SectionIndex(s);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user