Use method overloads that support trimming. Mark some types to be trimming friendly (#4083)
* Use method overloads that support trimming. Mark some types to be trimming friendly * Use generic version of marshalling method
This commit is contained in:
parent
ba5c0cf5d8
commit
edf7e628ca
10 changed files with 26 additions and 22 deletions
|
@ -9,6 +9,7 @@ using Ryujinx.HLE.Ui.Input;
|
|||
using Ryujinx.Memory;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -797,7 +798,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static T ReadStruct<T>(byte[] data)
|
||||
private static T ReadStruct<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T>(byte[] data)
|
||||
where T : struct
|
||||
{
|
||||
GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue