2 Commits
Author SHA1 Message Date
ds5678 1e263dd849 Bump version 2024-07-20 08:02:20 -07:00
ds5678 9678b4c296 Fix overflow in GetUsableMemorySize 2024-07-03 20:33:17 -07:00
2 changed files with 3 additions and 3 deletions

No files matched your search

@@ -56,12 +56,12 @@ internal static class GraphicsDeviceExtensions
nuint maxMemorySize = graphicsDevice.GetMaxMemorySize();
if (maxProportion == 1)
{
return (int)nuint.Min(maxMemorySize, int.MaxValue);
return maxMemorySize > int.MaxValue ? int.MaxValue : (int)maxMemorySize;
}
else
{
float multiplied = maxProportion * maxMemorySize;
return (int)float.Min(multiplied, int.MaxValue);
return multiplied > int.MaxValue ? int.MaxValue : (int)multiplied;
}
}
}
+1 -1
View File
@@ -6,7 +6,7 @@
<IsAotCompatible>true</IsAotCompatible>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<Copyright>Copyright © ds5678</Copyright>
<Authors>ds5678</Authors>