mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
In SPDB processing, try normalising filenames if we don't get a match
* Sometimes it seems like the filenames will differ between if \ is used or /, so try again with normalising everything to /
This commit is contained in:
@@ -1481,6 +1481,28 @@ SPDBChunk::SPDBChunk(Reflection *reflection, void *chunk)
|
||||
}
|
||||
}
|
||||
|
||||
if(fileIdx == -1)
|
||||
{
|
||||
// if file index is still -1, try again but with normalised names
|
||||
for(char &c : name)
|
||||
if(c == '\\')
|
||||
c = '/';
|
||||
|
||||
for(size_t i = 0; i < Files.size(); i++)
|
||||
{
|
||||
std::string normalised = Files[i].first;
|
||||
for(char &c : normalised)
|
||||
if(c == '\\')
|
||||
c = '/';
|
||||
|
||||
if(!_stricmp(normalised.c_str(), name.c_str()))
|
||||
{
|
||||
fileIdx = (int32_t)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileMapping[chunkOffs] = fileIdx;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user