/ src / Ryujinx.HLE / HOS / Applets / IApplet.cs
IApplet.cs
 1  using Ryujinx.HLE.HOS.Services.Am.AppletAE;
 2  using Ryujinx.HLE.UI;
 3  using Ryujinx.Memory;
 4  using System;
 5  using System.Runtime.InteropServices;
 6  
 7  namespace Ryujinx.HLE.HOS.Applets
 8  {
 9      interface IApplet
10      {
11          event EventHandler AppletStateChanged;
12  
13          ResultCode Start(AppletSession normalSession,
14                           AppletSession interactiveSession);
15  
16          ResultCode GetResult();
17  
18          bool DrawTo(RenderingSurfaceInfo surfaceInfo, IVirtualMemoryManager destination, ulong position)
19          {
20              return false;
21          }
22  
23          static T ReadStruct<T>(ReadOnlySpan<byte> data) where T : unmanaged
24          {
25              return MemoryMarshal.Cast<byte, T>(data)[0];
26          }
27      }
28  }