IApplet.cs 642 B

12345678910111213141516171819202122
  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. namespace Ryujinx.HLE.HOS.Applets
  7. {
  8. interface IApplet
  9. {
  10. event EventHandler AppletStateChanged;
  11. ResultCode Start(AppletSession normalSession,
  12. AppletSession interactiveSession);
  13. ResultCode GetResult();
  14. bool DrawTo(RenderingSurfaceInfo surfaceInfo, IVirtualMemoryManager destination, ulong position) => false;
  15. static T ReadStruct<T>(ReadOnlySpan<byte> data) where T : unmanaged => MemoryMarshal.Cast<byte, T>(data)[0];
  16. }
  17. }