IApplet.cs 521 B

123456789101112131415161718192021
  1. using Ryujinx.HLE.HOS.Services.Am.AppletAE;
  2. using System;
  3. using System.Runtime.InteropServices;
  4. namespace Ryujinx.HLE.HOS.Applets
  5. {
  6. interface IApplet
  7. {
  8. event EventHandler AppletStateChanged;
  9. ResultCode Start(AppletSession normalSession,
  10. AppletSession interactiveSession);
  11. ResultCode GetResult();
  12. static T ReadStruct<T>(ReadOnlySpan<byte> data) where T : unmanaged
  13. {
  14. return MemoryMarshal.Cast<byte, T>(data)[0];
  15. }
  16. }
  17. }