(ReadIndex): prioritize PRS images detection.

This commit is contained in:
morkt 2015-06-12 22:51:43 +04:00
parent d7899fa852
commit 10a52b7f5a

View File

@ -112,10 +112,9 @@ namespace GameRes.Formats.Marble
{ {
entry = new AutoEntry (name, () => { entry = new AutoEntry (name, () => {
uint signature = file.View.ReadUInt32 (offset); uint signature = file.View.ReadUInt32 (offset);
var res = FormatCatalog.Instance.LookupSignature (signature); if (0x4259 == (0xffff & signature))
if (!res.Any() && 0x4259 == (0xffff & signature)) return FormatCatalog.Instance.ImageFormats.FirstOrDefault (x => x.Tag == "PRS");
res = FormatCatalog.Instance.ImageFormats.Where (x => x.Tag == "PRS"); return FormatCatalog.Instance.LookupSignature (signature).FirstOrDefault();
return res.FirstOrDefault();
}); });
} }
entry.Offset = offset; entry.Offset = offset;