mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-25 22:10:22 +00:00
Store original usd1 section for saving back unless edited to prevent v9 bflyt glitches.
This commit is contained in:
parent
2a1b7b1d97
commit
ba0ac85543
2 changed files with 13 additions and 4 deletions
|
@ -411,16 +411,20 @@ namespace LayoutBXLYT.Cafe
|
|||
long dataPos = reader.Position;
|
||||
|
||||
if (currentPane != null)
|
||||
{
|
||||
((PAN1)currentPane).UserData = new USD1(reader, this);
|
||||
|
||||
reader.SeekBegin(dataPos);
|
||||
((PAN1)currentPane).UserData.Data = reader.ReadBytes((int)SectionSize - 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//User data before panes
|
||||
UserData = new USD1(reader, this);
|
||||
}
|
||||
reader.SeekBegin(dataPos);
|
||||
UserData.Data = reader.ReadBytes((int)SectionSize - 8);
|
||||
|
||||
reader.SeekBegin(dataPos);
|
||||
UserData.Data = reader.ReadBytes((int)SectionSize - 8);
|
||||
}
|
||||
break;
|
||||
//If the section is not supported store the raw bytes
|
||||
default:
|
||||
|
|
|
@ -33,6 +33,11 @@ namespace LayoutBXLYT.Cafe
|
|||
{
|
||||
long startPos = writer.Position - 8;
|
||||
|
||||
if (!Edited) {
|
||||
writer.Write(this.Data);
|
||||
return;
|
||||
}
|
||||
|
||||
writer.Write((ushort)Entries.Count);
|
||||
writer.Write((ushort)0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue