IApplet.cs 717 B

12345678910111213141516171819202122232425262728
  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)
  15. {
  16. return false;
  17. }
  18. static T ReadStruct<T>(ReadOnlySpan<byte> data) where T : unmanaged
  19. {
  20. return MemoryMarshal.Cast<byte, T>(data)[0];
  21. }
  22. }
  23. }