aboutsummaryrefslogblamecommitdiff
path: root/src/Ryujinx.HLE/HOS/Applets/IApplet.cs
blob: 224d67874d46d362ef45ecd5b732c9127959c5e8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                                              
                     
             
                                     





                                              

                                                           
                               
 



                                                                                                        
                                                                           

                                                        
     
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
using Ryujinx.HLE.Ui;
using Ryujinx.Memory;
using System;
using System.Runtime.InteropServices;

namespace Ryujinx.HLE.HOS.Applets
{
    interface IApplet
    {
        event EventHandler AppletStateChanged;

        ResultCode Start(AppletSession normalSession,
                         AppletSession interactiveSession);

        ResultCode GetResult();

        bool DrawTo(RenderingSurfaceInfo surfaceInfo, IVirtualMemoryManager destination, ulong position)
        {
            return false;
        }

        static T ReadStruct<T>(ReadOnlySpan<byte> data) where T : unmanaged
        {
            return MemoryMarshal.Cast<byte, T>(data)[0];
        }
    }
}