1
0
mirror of synced 2024-09-24 11:38:22 +02:00

Create a copy of the data to prevent splice corruption

This commit is contained in:
KillzXGaming 2019-06-30 16:57:56 -04:00
parent 7cc6c65bd0
commit fa5fc52258
6 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -621,7 +621,8 @@ namespace Switch_Toolbox.Library
blkHeight = 1;
}
byte[] data = tex.data;
byte[] data = new byte[tex.data.Length];
Array.Copy(tex.data, 0, data, 0, tex.data.Length);
var surfInfo = getSurfaceInfo((GX2SurfaceFormat)tex.format, tex.width, tex.height, tex.depth, (uint)tex.dim, (uint)tex.tileMode, (uint)tex.aa, 0);
uint bpp = DIV_ROUND_UP(surfInfo.bpp, 8);
@ -638,7 +639,6 @@ namespace Switch_Toolbox.Library
for (int arrayLevel = 0; arrayLevel < tex.depth; arrayLevel++)
{
List<byte[]> mips = new List<byte[]>();
for (int mipLevel = 0; mipLevel < mipCount; mipLevel++)
{
bool GetLevel = (arrayLevel == ArrayIndex && mipLevel == MipIndex);