mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 11:26:24 +02:00
Up Image Limit
This commit is contained in:
parent
f55d596688
commit
de19cc29d8
2 changed files with 2 additions and 4 deletions
Binary file not shown.
|
@ -1409,17 +1409,15 @@ public unsafe struct GameInfoNative
|
||||||
CopyStringToFixedArray(developer, developerPtr, 256);
|
CopyStringToFixedArray(developer, developerPtr, 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imageData == null || imageData.Length > 1024 * 1024)
|
if (imageData == null || imageData.Length > 4096 * 4096)
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Image data must not exceed 1 MB.");
|
throw new ArgumentException("Image data must not exceed 4 MB.");
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageSize = (uint)imageData.Length;
|
ImageSize = (uint)imageData.Length;
|
||||||
|
|
||||||
// Allocate unmanaged memory for the image data
|
|
||||||
ImageData = (byte*)Marshal.AllocHGlobal(imageData.Length);
|
ImageData = (byte*)Marshal.AllocHGlobal(imageData.Length);
|
||||||
|
|
||||||
// Copy the image data to the allocated memory
|
|
||||||
Marshal.Copy(imageData, 0, (IntPtr)ImageData, imageData.Length);
|
Marshal.Copy(imageData, 0, (IntPtr)ImageData, imageData.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue