PTCL : Make sure to save changes to bfres for switch

This commit is contained in:
KillzXGaming 2020-04-14 14:23:42 -04:00
parent d45ca032b2
commit c220b6a3ed

View file

@ -652,10 +652,19 @@ namespace FirstPlugin
SaveHeader(writer, header, BinaryDataBytes, 4096);
break;
case "G3PR":
// SaveHeader(writer, header, ((BFRES)BinaryData).Save(), 4096);
{
var mem = new System.IO.MemoryStream();
if (BinaryData != null)
{
((BFRES)BinaryData).Save(mem);
SaveHeader(writer, header, mem.ToArray(), 4096);
}
else
SaveHeader(writer, header, BinaryDataBytes, 4096);
}
break;
case "GRTF":
{
var mem = new System.IO.MemoryStream();
if (BinaryData != null)
{
@ -664,6 +673,7 @@ namespace FirstPlugin
}
else
SaveHeader(writer, header, BinaryDataBytes, 4096);
}
break;
case "PRIM":
SaveHeader(writer, header, BinaryDataBytes);