aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Applets/IApplet.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Applets/IApplet.cs')
-rw-r--r--Ryujinx.HLE/HOS/Applets/IApplet.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Applets/IApplet.cs b/Ryujinx.HLE/HOS/Applets/IApplet.cs
index c2d4aada..b10ede68 100644
--- a/Ryujinx.HLE/HOS/Applets/IApplet.cs
+++ b/Ryujinx.HLE/HOS/Applets/IApplet.cs
@@ -1,5 +1,6 @@
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
using System;
+using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Applets
{
@@ -11,5 +12,10 @@ namespace Ryujinx.HLE.HOS.Applets
AppletSession interactiveSession);
ResultCode GetResult();
+
+ static T ReadStruct<T>(ReadOnlySpan<byte> data) where T : struct
+ {
+ return MemoryMarshal.Cast<byte, T>(data)[0];
+ }
}
}