mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2025-02-18 06:48:24 +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;
|
long dataPos = reader.Position;
|
||||||
|
|
||||||
if (currentPane != null)
|
if (currentPane != null)
|
||||||
|
{
|
||||||
((PAN1)currentPane).UserData = new USD1(reader, this);
|
((PAN1)currentPane).UserData = new USD1(reader, this);
|
||||||
|
|
||||||
|
reader.SeekBegin(dataPos);
|
||||||
|
((PAN1)currentPane).UserData.Data = reader.ReadBytes((int)SectionSize - 8);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
//User data before panes
|
//User data before panes
|
||||||
UserData = new USD1(reader, this);
|
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;
|
break;
|
||||||
//If the section is not supported store the raw bytes
|
//If the section is not supported store the raw bytes
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -33,6 +33,11 @@ namespace LayoutBXLYT.Cafe
|
||||||
{
|
{
|
||||||
long startPos = writer.Position - 8;
|
long startPos = writer.Position - 8;
|
||||||
|
|
||||||
|
if (!Edited) {
|
||||||
|
writer.Write(this.Data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
writer.Write((ushort)Entries.Count);
|
writer.Write((ushort)Entries.Count);
|
||||||
writer.Write((ushort)0);
|
writer.Write((ushort)0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue