Up Image Limit

This commit is contained in:
Stossy11 2024-12-10 06:13:11 +11:00
parent f55d596688
commit de19cc29d8
2 changed files with 2 additions and 4 deletions

View File

@ -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);
} }