aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests.Unicorn/Native
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Tests.Unicorn/Native')
-rw-r--r--Ryujinx.Tests.Unicorn/Native/Interface.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Ryujinx.Tests.Unicorn/Native/Interface.cs b/Ryujinx.Tests.Unicorn/Native/Interface.cs
index 0ecda22e..889441ab 100644
--- a/Ryujinx.Tests.Unicorn/Native/Interface.cs
+++ b/Ryujinx.Tests.Unicorn/Native/Interface.cs
@@ -1,5 +1,6 @@
using Ryujinx.Tests.Unicorn.Native.Const;
using System;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
@@ -43,9 +44,9 @@ namespace Ryujinx.Tests.Unicorn.Native
}
}
- public static void MarshalArrayOf<T>(IntPtr input, int length, out T[] output)
+ public static void MarshalArrayOf<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T>(IntPtr input, int length, out T[] output)
{
- int size = Marshal.SizeOf(typeof(T));
+ int size = Marshal.SizeOf<T>();
output = new T[length];