Can't use Marshal.PtrToStructure(IntPtr, object) with boxed value types. Reverting to object Marshal.PtrToStructure(IntPtr, Type).
This commit is contained in:
parent
3e45bbc85c
commit
a62e0fb6a6
1 changed files with 1 additions and 1 deletions
|
@ -1349,7 +1349,7 @@ XF86VidModeGetGammaRampSize(
|
|||
for (int i = 0; i < nsizes; i++)
|
||||
{
|
||||
array[i] = new XRRScreenSize();
|
||||
Marshal.PtrToStructure((IntPtr)data, array[i]);
|
||||
array[i] = (XRRScreenSize)Marshal.PtrToStructure((IntPtr)data, typeof(XRRScreenSize));
|
||||
data += Marshal.SizeOf(typeof(XRRScreenSize));
|
||||
}
|
||||
XFree(ptr);
|
||||
|
|
Loading…
Reference in a new issue